| 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_values.h" | 5 #include "tools/gn/action_values.h" |
| 6 | 6 |
| 7 #include "tools/gn/settings.h" |
| 7 #include "tools/gn/substitution_writer.h" | 8 #include "tools/gn/substitution_writer.h" |
| 8 #include "tools/gn/target.h" | 9 #include "tools/gn/target.h" |
| 9 | 10 |
| 10 ActionValues::ActionValues() { | 11 ActionValues::ActionValues() { |
| 11 } | 12 } |
| 12 | 13 |
| 13 ActionValues::~ActionValues() { | 14 ActionValues::~ActionValues() { |
| 14 } | 15 } |
| 15 | 16 |
| 16 void ActionValues::GetOutputsAsSourceFiles( | 17 void ActionValues::GetOutputsAsSourceFiles( |
| 17 const Target* target, | 18 const Target* target, |
| 18 std::vector<SourceFile>* result) const { | 19 std::vector<SourceFile>* result) const { |
| 19 if (target->output_type() == Target::COPY_FILES || | 20 if (target->output_type() == Target::COPY_FILES || |
| 20 target->output_type() == Target::ACTION_FOREACH) { | 21 target->output_type() == Target::ACTION_FOREACH) { |
| 21 // Copy and foreach applies the outputs to the sources. | 22 // Copy and foreach applies the outputs to the sources. |
| 22 SubstitutionWriter::ApplyListToSources( | 23 SubstitutionWriter::ApplyListToSources( |
| 23 target->settings(), outputs_, target->sources(), result); | 24 target->settings(), outputs_, target->sources(), result); |
| 24 } else { | 25 } else { |
| 25 // Actions (and anything else that happens to specify an output) just use | 26 // Actions (and anything else that happens to specify an output) just use |
| 26 // the output list with no substitution. | 27 // the output list with no substitution. |
| 27 SubstitutionWriter::GetListAsSourceFiles(outputs_, result); | 28 SubstitutionWriter::GetListAsSourceFiles(outputs_, result); |
| 28 } | 29 } |
| 29 } | 30 } |
| OLD | NEW |