Index: tools/gn/action_values.cc |
diff --git a/tools/gn/action_values.cc b/tools/gn/action_values.cc |
index 80bea62a7da149ad4e83021ce282acd3f0e34426..2215167da366442b1db3a4afe885177ca543aedb 100644 |
--- a/tools/gn/action_values.cc |
+++ b/tools/gn/action_values.cc |
@@ -4,8 +4,26 @@ |
#include "tools/gn/action_values.h" |
+#include "tools/gn/substitution_writer.h" |
+#include "tools/gn/target.h" |
+ |
ActionValues::ActionValues() { |
} |
ActionValues::~ActionValues() { |
} |
+ |
+void ActionValues::GetOutputsAsSourceFiles( |
+ const Target* target, |
+ std::vector<SourceFile>* result) const { |
+ if (target->output_type() == Target::COPY_FILES || |
+ target->output_type() == Target::ACTION_FOREACH) { |
+ // Copy and foreach applies the outputs to the sources. |
+ SubstitutionWriter::ApplyListToSources( |
+ target->settings(), outputs_, target->sources(), result); |
+ } else { |
+ // Actions (and anything else that happens to specify an output) just use |
+ // the output list with no substitution. |
+ SubstitutionWriter::GetListAsSourceFiles(outputs_, result); |
+ } |
+} |