Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / tools / gn / BUILD.gn
bloba90456c8c82ffffee359c9ff5dd86c48e350d775
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
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 defines = [ "GN_BUILD" ]
9 static_library("gn_lib") {
10   sources = [
11     "action_target_generator.cc",
12     "action_target_generator.h",
13     "action_values.cc",
14     "action_values.h",
15     "args.cc",
16     "args.h",
17     "binary_target_generator.cc",
18     "binary_target_generator.h",
19     "build_settings.cc",
20     "build_settings.h",
21     "builder.cc",
22     "builder.h",
23     "builder_record.cc",
24     "builder_record.h",
25     "c_include_iterator.cc",
26     "c_include_iterator.h",
27     "command_args.cc",
28     "command_check.cc",
29     "command_clean.cc",
30     "command_desc.cc",
31     "command_format.cc",
32     "command_gen.cc",
33     "command_help.cc",
34     "command_ls.cc",
35     "command_refs.cc",
36     "commands.cc",
37     "commands.h",
38     "config.cc",
39     "config.h",
40     "config_values.cc",
41     "config_values.h",
42     "config_values_extractors.cc",
43     "config_values_extractors.h",
44     "config_values_generator.cc",
45     "config_values_generator.h",
46     "copy_target_generator.cc",
47     "copy_target_generator.h",
48     "deps_iterator.cc",
49     "deps_iterator.h",
50     "err.cc",
51     "err.h",
52     "escape.cc",
53     "escape.h",
54     "exec_process.cc",
55     "exec_process.h",
56     "filesystem_utils.cc",
57     "filesystem_utils.h",
58     "function_exec_script.cc",
59     "function_foreach.cc",
60     "function_get_label_info.cc",
61     "function_get_path_info.cc",
62     "function_get_target_outputs.cc",
63     "function_process_file_template.cc",
64     "function_read_file.cc",
65     "function_rebase_path.cc",
66     "function_set_default_toolchain.cc",
67     "function_set_defaults.cc",
68     "function_template.cc",
69     "function_toolchain.cc",
70     "function_write_file.cc",
71     "functions.cc",
72     "functions.h",
73     "functions_target.cc",
74     "group_target_generator.cc",
75     "group_target_generator.h",
76     "header_checker.cc",
77     "header_checker.h",
78     "import_manager.cc",
79     "import_manager.h",
80     "inherited_libraries.cc",
81     "inherited_libraries.h",
82     "input_conversion.cc",
83     "input_conversion.h",
84     "input_file.cc",
85     "input_file.h",
86     "input_file_manager.cc",
87     "input_file_manager.h",
88     "item.cc",
89     "item.h",
90     "label.cc",
91     "label.h",
92     "label_pattern.cc",
93     "label_pattern.h",
94     "label_ptr.h",
95     "loader.cc",
96     "loader.h",
97     "location.cc",
98     "location.h",
99     "ninja_action_target_writer.cc",
100     "ninja_action_target_writer.h",
101     "ninja_binary_target_writer.cc",
102     "ninja_binary_target_writer.h",
103     "ninja_build_writer.cc",
104     "ninja_build_writer.h",
105     "ninja_copy_target_writer.cc",
106     "ninja_copy_target_writer.h",
107     "ninja_group_target_writer.cc",
108     "ninja_group_target_writer.h",
109     "ninja_target_writer.cc",
110     "ninja_target_writer.h",
111     "ninja_toolchain_writer.cc",
112     "ninja_toolchain_writer.h",
113     "ninja_utils.cc",
114     "ninja_utils.h",
115     "ninja_writer.cc",
116     "ninja_writer.h",
117     "operators.cc",
118     "operators.h",
119     "output_file.cc",
120     "output_file.h",
121     "parse_tree.cc",
122     "parse_tree.h",
123     "parser.cc",
124     "parser.h",
125     "path_output.cc",
126     "path_output.h",
127     "pattern.cc",
128     "pattern.h",
129     "scheduler.cc",
130     "scheduler.h",
131     "scope.cc",
132     "scope.h",
133     "scope_per_file_provider.cc",
134     "scope_per_file_provider.h",
135     "settings.cc",
136     "settings.h",
137     "setup.cc",
138     "setup.h",
139     "source_dir.cc",
140     "source_dir.h",
141     "source_file.cc",
142     "source_file.h",
143     "source_file_type.cc",
144     "source_file_type.h",
145     "standard_out.cc",
146     "standard_out.h",
147     "string_utils.cc",
148     "string_utils.h",
149     "substitution_list.cc",
150     "substitution_list.h",
151     "substitution_pattern.cc",
152     "substitution_pattern.h",
153     "substitution_type.cc",
154     "substitution_type.h",
155     "substitution_writer.cc",
156     "substitution_writer.h",
157     "switches.cc",
158     "switches.h",
159     "target.cc",
160     "target.h",
161     "target_generator.cc",
162     "target_generator.h",
163     "template.cc",
164     "template.h",
165     "token.cc",
166     "token.h",
167     "tokenizer.cc",
168     "tokenizer.h",
169     "tool.cc",
170     "tool.h",
171     "toolchain.cc",
172     "toolchain.h",
173     "trace.cc",
174     "trace.h",
175     "unique_vector.h",
176     "value.cc",
177     "value.h",
178     "value_extractors.cc",
179     "value_extractors.h",
180     "variables.cc",
181     "variables.h",
182     "visibility.cc",
183     "visibility.h",
184   ]
186   deps = [
187     "//base",
188     "//base/third_party/dynamic_annotations",
189   ]
192 action("last_commit_position") {
193   script = "last_commit_position.py"
195   # This dependency forces a re-run when the code is synced.
196   inputs = [
197     "//build/util/LASTCHANGE",
198   ]
200   outfile = "$target_gen_dir/last_commit_position.h"
201   outputs = [
202     outfile,
203   ]
205   args = [
206     rebase_path("//", root_build_dir),
207     rebase_path(outfile, root_build_dir),
208     "TOOLS_GN_LAST_COMMIT_POSITION_H_",
209   ]
212 executable("gn") {
213   sources = [
214     "gn_main.cc",
215   ]
217   deps = [
218     ":gn_lib",
219     ":last_commit_position",
220     "//base",
221   ]
224 test("gn_unittests") {
225   sources = [
226     "action_target_generator_unittest.cc",
227     "args_unittest.cc",
228     "builder_unittest.cc",
229     "c_include_iterator_unittest.cc",
230     "command_format_unittest.cc",
231     "config_values_extractors_unittest.cc",
232     "escape_unittest.cc",
233     "exec_process_unittest.cc",
234     "filesystem_utils_unittest.cc",
235     "function_foreach_unittest.cc",
236     "function_get_label_info_unittest.cc",
237     "function_get_path_info_unittest.cc",
238     "function_get_target_outputs_unittest.cc",
239     "function_process_file_template_unittest.cc",
240     "function_rebase_path_unittest.cc",
241     "function_write_file_unittest.cc",
242     "functions_target_unittest.cc",
243     "functions_unittest.cc",
244     "header_checker_unittest.cc",
245     "inherited_libraries_unittest.cc",
246     "input_conversion_unittest.cc",
247     "label_pattern_unittest.cc",
248     "label_unittest.cc",
249     "loader_unittest.cc",
250     "ninja_action_target_writer_unittest.cc",
251     "ninja_binary_target_writer_unittest.cc",
252     "ninja_copy_target_writer_unittest.cc",
253     "ninja_group_target_writer_unittest.cc",
254     "ninja_target_writer_unittest.cc",
255     "ninja_toolchain_writer_unittest.cc",
256     "operators_unittest.cc",
257     "parse_tree_unittest.cc",
258     "parser_unittest.cc",
259     "path_output_unittest.cc",
260     "pattern_unittest.cc",
261     "scope_per_file_provider_unittest.cc",
262     "scope_unittest.cc",
263     "source_dir_unittest.cc",
264     "string_utils_unittest.cc",
265     "substitution_pattern_unittest.cc",
266     "substitution_writer_unittest.cc",
267     "target_generator_unittest.cc",
268     "target_unittest.cc",
269     "template_unittest.cc",
270     "test_with_scope.cc",
271     "test_with_scope.h",
272     "tokenizer_unittest.cc",
273     "unique_vector_unittest.cc",
274     "value_unittest.cc",
275     "visibility_unittest.cc",
276   ]
277   deps = [
278     ":gn_lib",
279     "//base/test:run_all_unittests",
280     "//base/test:test_support",
281     "//testing/gtest",
282   ]
285 executable("generate_test_gn_data") {
286   sources = [
287     "generate_test_gn_data.cc",
288   ]
289   deps = [
290     "//base",
291   ]