| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/action_target_generator.h" | 5 #include "tools/gn/action_target_generator.h" |
| 6 | 6 |
| 7 #include "tools/gn/build_settings.h" | 7 #include "tools/gn/build_settings.h" |
| 8 #include "tools/gn/err.h" | 8 #include "tools/gn/err.h" |
| 9 #include "tools/gn/filesystem_utils.h" | 9 #include "tools/gn/filesystem_utils.h" |
| 10 #include "tools/gn/parse_tree.h" | 10 #include "tools/gn/parse_tree.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 if (!FillScriptArgs()) | 48 if (!FillScriptArgs()) |
| 49 return; | 49 return; |
| 50 | 50 |
| 51 if (!FillOutputs(output_type_ == Target::ACTION_FOREACH)) | 51 if (!FillOutputs(output_type_ == Target::ACTION_FOREACH)) |
| 52 return; | 52 return; |
| 53 | 53 |
| 54 if (!FillDepfile()) | 54 if (!FillDepfile()) |
| 55 return; | 55 return; |
| 56 | 56 |
| 57 if (!FillCheckIncludes()) |
| 58 return; |
| 59 |
| 57 if (!CheckOutputs()) | 60 if (!CheckOutputs()) |
| 58 return; | 61 return; |
| 59 | 62 |
| 60 // Action outputs don't depend on the current toolchain so we can skip adding | 63 // Action outputs don't depend on the current toolchain so we can skip adding |
| 61 // that dependency. | 64 // that dependency. |
| 62 } | 65 } |
| 63 | 66 |
| 64 bool ActionTargetGenerator::FillScript() { | 67 bool ActionTargetGenerator::FillScript() { |
| 65 // If this gets called, the target type requires a script, so error out | 68 // If this gets called, the target type requires a script, so error out |
| 66 // if it doesn't have one. | 69 // if it doesn't have one. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 *err_ = Err(function_call_, | 131 *err_ = Err(function_call_, |
| 129 "action_foreach should have a pattern in the output.", | 132 "action_foreach should have a pattern in the output.", |
| 130 "An action_foreach target should have a source expansion pattern in\n" | 133 "An action_foreach target should have a source expansion pattern in\n" |
| 131 "it to map source file to unique output file name. Otherwise, the\n" | 134 "it to map source file to unique output file name. Otherwise, the\n" |
| 132 "build system can't determine when your script needs to be run."); | 135 "build system can't determine when your script needs to be run."); |
| 133 return false; | 136 return false; |
| 134 } | 137 } |
| 135 } | 138 } |
| 136 return true; | 139 return true; |
| 137 } | 140 } |
| OLD | NEW |