Chromium Code Reviews| Index: tools/gn/copy_target_generator.cc |
| diff --git a/tools/gn/copy_target_generator.cc b/tools/gn/copy_target_generator.cc |
| index 994011e824e614e5bdb5660d1a501fe2af7d5c64..bd3ef176dd1458c1cf3b9851cd22d823a7f4e391 100644 |
| --- a/tools/gn/copy_target_generator.cc |
| +++ b/tools/gn/copy_target_generator.cc |
| @@ -42,3 +42,30 @@ void CopyTargetGenerator::DoRun() { |
| return; |
| } |
| } |
| + |
| +CopyBundleDataTargetGenerator::CopyBundleDataTargetGenerator( |
|
brettw
2016/01/20 22:23:17
I don't like having this one class in the same fil
sdefresne
2016/01/21 22:00:56
Merged.
|
| + Target* target, |
| + Scope* scope, |
| + const FunctionCallNode* function_call, |
| + Err* err) |
| + : TargetGenerator(target, scope, function_call, err) { |
| +} |
| + |
| +CopyBundleDataTargetGenerator::~CopyBundleDataTargetGenerator() { |
| +} |
| + |
| +void CopyBundleDataTargetGenerator::DoRun() { |
| + target_->set_output_type(Target::COPY_BUNDLE_DATA); |
| + |
| + if (!FillOutputs(true)) |
| + return; |
| + |
| + if (target_->action_values().outputs().list().size() != 1) { |
| + *err_ = Err(function_call_, "Copy command must have exactly one output.", |
| + "You must specify exactly one value in the \"outputs\" array for the " |
| + "destination of the copy\n(see \"gn help copy\"). If there are " |
| + "multiple sources to copy, use source expansion\n(see \"gn help " |
| + "source_expansion\")."); |
| + return; |
| + } |
| +} |