OLD | NEW |
| (Empty) |
1 # Copyright 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. | |
4 | |
5 { | |
6 'variables': { | |
7 # When including this gypi, the following variables must be set: | |
8 # schema_files: a list of json or IDL files that comprise the features mod
el. | |
9 # cc_dir: path to generated files | |
10 # root_namespace: the C++ namespace that all generated files go under | |
11 'feature_gen_dir': '<(DEPTH)/tools/json_schema_compiler', | |
12 'feature_gen': '<(feature_gen_dir)/features_compiler.py', | |
13 }, | |
14 'rules': [ | |
15 { | |
16 'rule_name': 'genfeature', | |
17 'msvs_external_rule': 1, | |
18 'extension': 'json', | |
19 'inputs': [ | |
20 '<(feature_gen_dir)/features_cc_generator.py', | |
21 '<(feature_gen_dir)/code.py', | |
22 '<(feature_gen_dir)/features_compiler.py', | |
23 '<(feature_gen_dir)/cpp_util.py', | |
24 '<(feature_gen_dir)/features_h_generator.py', | |
25 '<(feature_gen_dir)/json_schema.py', | |
26 '<(feature_gen_dir)/model.py', | |
27 '<(feature_gen_dir)/util.cc', | |
28 '<(feature_gen_dir)/util.h', | |
29 '<(feature_gen_dir)/util_cc_helper.py', | |
30 '<@(schema_files)', | |
31 ], | |
32 'outputs': [ | |
33 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc', | |
34 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h', | |
35 ], | |
36 'action': [ | |
37 'python', | |
38 '<(feature_gen)', | |
39 '<(RULE_INPUT_PATH)', | |
40 '--root=<(DEPTH)', | |
41 '--destdir=<(SHARED_INTERMEDIATE_DIR)', | |
42 '--namespace=<(root_namespace)', | |
43 ], | |
44 'message': 'Generating C++ feature code from <(RULE_INPUT_PATH) json files
', | |
45 'process_outputs_as_sources': 1, | |
46 }, | |
47 ], | |
48 'include_dirs': [ | |
49 '<(SHARED_INTERMEDIATE_DIR)', | |
50 '<(DEPTH)', | |
51 ], | |
52 'direct_dependent_settings': { | |
53 'include_dirs': [ | |
54 '<(SHARED_INTERMEDIATE_DIR)', | |
55 ] | |
56 }, | |
57 # This target exports a hard dependency because it generates header | |
58 # files. | |
59 'hard_dependency': 1, | |
60 } | |
OLD | NEW |