Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: tools/gn/copy_target_generator.cc

Issue 1606553002: Add support for Mac/iOS application bundles to GN tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base_unittests builds and pass all tests with GN Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/copy_target_generator.h" 5 #include "tools/gn/copy_target_generator.h"
6 6
7 #include "tools/gn/build_settings.h" 7 #include "tools/gn/build_settings.h"
8 #include "tools/gn/filesystem_utils.h" 8 #include "tools/gn/filesystem_utils.h"
9 #include "tools/gn/parse_tree.h" 9 #include "tools/gn/parse_tree.h"
10 #include "tools/gn/scope.h" 10 #include "tools/gn/scope.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 if (target_->action_values().outputs().list().size() != 1) { 36 if (target_->action_values().outputs().list().size() != 1) {
37 *err_ = Err(function_call_, "Copy command must have exactly one output.", 37 *err_ = Err(function_call_, "Copy command must have exactly one output.",
38 "You must specify exactly one value in the \"outputs\" array for the " 38 "You must specify exactly one value in the \"outputs\" array for the "
39 "destination of the copy\n(see \"gn help copy\"). If there are " 39 "destination of the copy\n(see \"gn help copy\"). If there are "
40 "multiple sources to copy, use source expansion\n(see \"gn help " 40 "multiple sources to copy, use source expansion\n(see \"gn help "
41 "source_expansion\")."); 41 "source_expansion\").");
42 return; 42 return;
43 } 43 }
44 } 44 }
45
46 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.
47 Target* target,
48 Scope* scope,
49 const FunctionCallNode* function_call,
50 Err* err)
51 : TargetGenerator(target, scope, function_call, err) {
52 }
53
54 CopyBundleDataTargetGenerator::~CopyBundleDataTargetGenerator() {
55 }
56
57 void CopyBundleDataTargetGenerator::DoRun() {
58 target_->set_output_type(Target::COPY_BUNDLE_DATA);
59
60 if (!FillOutputs(true))
61 return;
62
63 if (target_->action_values().outputs().list().size() != 1) {
64 *err_ = Err(function_call_, "Copy command must have exactly one output.",
65 "You must specify exactly one value in the \"outputs\" array for the "
66 "destination of the copy\n(see \"gn help copy\"). If there are "
67 "multiple sources to copy, use source expansion\n(see \"gn help "
68 "source_expansion\").");
69 return;
70 }
71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698