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

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

Issue 115323009: Fix help and error messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/function_set_defaults.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/parse_tree.h" 7 #include "tools/gn/parse_tree.h"
8 #include "tools/gn/scope.h" 8 #include "tools/gn/scope.h"
9 #include "tools/gn/value.h" 9 #include "tools/gn/value.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 "\n" 59 "\n"
60 " # Intermediate target to compile IDL to C source.\n" 60 " # Intermediate target to compile IDL to C source.\n"
61 " custom(\"${target_name}_code_gen\") {\n" 61 " custom(\"${target_name}_code_gen\") {\n"
62 " # The |sources| will be inherited from the surrounding scope so\n" 62 " # The |sources| will be inherited from the surrounding scope so\n"
63 " # we don't need to redefine it.\n" 63 " # we don't need to redefine it.\n"
64 " script = \"foo.py\"\n" 64 " script = \"foo.py\"\n"
65 " outputs = filter # Variable from above.\n" 65 " outputs = filter # Variable from above.\n"
66 " }\n" 66 " }\n"
67 "\n" 67 "\n"
68 " # Name the static library the same as the template invocation so\n" 68 " # Name the static library the same as the template invocation so\n"
69 " # instanting this template produces something that other targets\n" 69 " # instancing this template produces something that other targets\n"
70 " # can link to in their deps.\n" 70 " # can link to in their deps.\n"
71 " static_library(target_name) {\n" 71 " static_library(target_name) {\n"
72 " # Generates the list of sources.\n" 72 " # Generates the list of sources.\n"
73 " # See \"gn help process_file_template\"\n" 73 " # See \"gn help process_file_template\"\n"
74 " sources = process_file_template(sources, filter)\n" 74 " sources = process_file_template(sources, filter)\n"
75 " }\n" 75 " }\n"
76 " }\n" 76 " }\n"
77 "\n" 77 "\n"
78 "Example of invoking the resulting template:\n" 78 "Example of invoking the resulting template:\n"
79 "\n" 79 "\n"
(...skipping 24 matching lines...) Expand all
104 err->AppendSubErr(Err(existing_template->function(), 104 err->AppendSubErr(Err(existing_template->function(),
105 "Previous definition.")); 105 "Previous definition."));
106 return Value(); 106 return Value();
107 } 107 }
108 108
109 scope->AddTemplate(template_name, function); 109 scope->AddTemplate(template_name, function);
110 return Value(); 110 return Value();
111 } 111 }
112 112
113 } // namespace functions 113 } // namespace functions
OLDNEW
« no previous file with comments | « tools/gn/function_set_defaults.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698