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

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

Issue 1752033002: Add "create_bundle" target in order to support bundle with gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-bundle-data
Patch Set: Rebase Created 4 years, 9 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/functions.h" 5 #include "tools/gn/functions.h"
6 6
7 #include "tools/gn/config_values_generator.h" 7 #include "tools/gn/config_values_generator.h"
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 Value RunBundleData(Scope* scope, 258 Value RunBundleData(Scope* scope,
259 const FunctionCallNode* function, 259 const FunctionCallNode* function,
260 const std::vector<Value>& args, 260 const std::vector<Value>& args,
261 BlockNode* block, 261 BlockNode* block,
262 Err* err) { 262 Err* err) {
263 return ExecuteGenericTarget(functions::kBundleData, scope, function, args, 263 return ExecuteGenericTarget(functions::kBundleData, scope, function, args,
264 block, err); 264 block, err);
265 } 265 }
266 266
267 // create_bundle ---------------------------------------------------------------
268
269 const char kCreateBundle[] = "create_bundle";
270 const char kCreateBundle_HelpShort[] =
271 "create_bundle: Build an OS X / iOS bundle.";
272 const char kCreateBundle_Help[] =
273 "create_bundle: Build an OS X / iOS bundle.\n"
274 "\n"
275 " This target create an OS X / iOS bundle copying file listed as sources\n"
brettw 2016/03/02 21:12:42 This sentence doesn't make sense to me. Can you ex
sdefresne 2016/03/07 20:47:35 Done.
276 " of any \"bundle_data\" target it recursively depends (stopping at any\n"
277 " \"create_bundle\" target).\n";
brettw 2016/03/02 21:12:42 The other target types have a variable section at
sdefresne 2016/03/07 20:47:35 Done.
278
279 Value RunCreateBundle(Scope* scope,
280 const FunctionCallNode* function,
281 const std::vector<Value>& args,
282 BlockNode* block,
283 Err* err) {
284 return ExecuteGenericTarget(functions::kCreateBundle, scope, function, args,
285 block, err);
286 }
287
267 // copy ------------------------------------------------------------------------ 288 // copy ------------------------------------------------------------------------
268 289
269 const char kCopy[] = "copy"; 290 const char kCopy[] = "copy";
270 const char kCopy_HelpShort[] = 291 const char kCopy_HelpShort[] =
271 "copy: Declare a target that copies files."; 292 "copy: Declare a target that copies files.";
272 const char kCopy_Help[] = 293 const char kCopy_Help[] =
273 "copy: Declare a target that copies files.\n" 294 "copy: Declare a target that copies files.\n"
274 "\n" 295 "\n"
275 "File name handling\n" 296 "File name handling\n"
276 "\n" 297 "\n"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 const Template* templ = scope->GetTemplate(target_type); 599 const Template* templ = scope->GetTemplate(target_type);
579 if (templ) 600 if (templ)
580 return templ->Invoke(scope, function, sub_args, block, err); 601 return templ->Invoke(scope, function, sub_args, block, err);
581 602
582 // Otherwise, assume the target is a built-in target type. 603 // Otherwise, assume the target is a built-in target type.
583 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args, 604 return ExecuteGenericTarget(target_type.c_str(), scope, function, sub_args,
584 block, err); 605 block, err);
585 } 606 }
586 607
587 } // namespace functions 608 } // namespace functions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698