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

Side by Side Diff: build/json_schema_compile.gypi

Issue 9456007: Add wider support to json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework Created 8 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
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | tools/json_schema_compiler/cc_generator.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 { 5 {
6 'variables': { 6 'variables': {
7 # When including this gypi, the following variables must be set: 7 # When including this gypi, the following variables must be set:
8 # json_schema_files: an array of json files that comprise the api model. 8 # json_schema_files: an array of json files that comprise the api model.
9 # cc_dir: path to generated files 9 # cc_dir: path to generated files
10 # root_namespace: the C++ namespace that all generated files go under 10 # root_namespace: the C++ namespace that all generated files go under
11 # Functions and namespaces can be excluded by setting "nocompile" to true. 11 # Functions and namespaces can be excluded by setting "nocompile" to true.
12 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler', 12 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
13 'api_gen': '<(api_gen_dir)/compiler.py', 13 'api_gen': '<(api_gen_dir)/compiler.py',
14 }, 14 },
15 'rules': [ 15 'rules': [
16 { 16 {
17 'rule_name': 'genapi', 17 'rule_name': 'genapi',
18 'extension': 'json', 18 'extension': 'json',
19 'inputs': [ 19 'inputs': [
20 '<(api_gen_dir)/cc_generator.py', 20 '<(api_gen_dir)/cc_generator.py',
21 '<(api_gen_dir)/code.py', 21 '<(api_gen_dir)/code.py',
22 '<(api_gen_dir)/compiler.py', 22 '<(api_gen_dir)/compiler.py',
23 '<(api_gen_dir)/cpp_util.py', 23 '<(api_gen_dir)/cpp_util.py',
24 '<(api_gen_dir)/cpp_type_generator.py', 24 '<(api_gen_dir)/cpp_type_generator.py',
25 '<(api_gen_dir)/h_generator.py', 25 '<(api_gen_dir)/h_generator.py',
26 '<(api_gen_dir)/model.py', 26 '<(api_gen_dir)/model.py',
27 '<(api_gen_dir)/util.cc', 27 '<(api_gen_dir)/util.cc',
28 '<(api_gen_dir)/util.h', 28 '<(api_gen_dir)/util.h',
29 '<(api_gen_dir)/util_cc_helper.py', 29 '<(api_gen_dir)/util_cc_helper.py',
30 # TODO(calamity): uncomment this when gyp on windows behaves like other
31 # platforms.
Yoyo Zhou 2012/02/28 00:29:46 Can you expand on this in the comment? What behavi
calamity 2012/02/28 01:01:45 Done.
32 # '<@(json_schema_files)',
30 ], 33 ],
31 'outputs': [ 34 'outputs': [
32 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc', 35 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
33 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h', 36 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
34 ], 37 ],
35 'action': [ 38 'action': [
36 'python', 39 'python',
37 '<(api_gen)', 40 '<(api_gen)',
38 '<(RULE_INPUT_PATH)', 41 '<(RULE_INPUT_PATH)',
39 '--root=<(DEPTH)', 42 '--root=<(DEPTH)',
40 '--destdir=<(SHARED_INTERMEDIATE_DIR)', 43 '--destdir=<(SHARED_INTERMEDIATE_DIR)',
41 '--namespace=<(root_namespace)', 44 '--namespace=<(root_namespace)',
42 '<@(json_schema_files)',
43 ], 45 ],
44 'message': 'Generating C++ code from <(RULE_INPUT_PATH) jsons', 46 'message': 'Generating C++ code from <(RULE_INPUT_PATH) jsons',
45 'process_outputs_as_sources': 1, 47 'process_outputs_as_sources': 1,
46 }, 48 },
47 ], 49 ],
48 'include_dirs': [ 50 'include_dirs': [
49 '<(SHARED_INTERMEDIATE_DIR)', 51 '<(SHARED_INTERMEDIATE_DIR)',
50 '<(DEPTH)', 52 '<(DEPTH)',
51 ], 53 ],
52 'dependencies':[ 54 'dependencies':[
53 '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util', 55 '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util',
54 ], 56 ],
55 'direct_dependent_settings': { 57 'direct_dependent_settings': {
56 'include_dirs': [ 58 'include_dirs': [
57 '<(SHARED_INTERMEDIATE_DIR)', 59 '<(SHARED_INTERMEDIATE_DIR)',
58 ] 60 ]
59 }, 61 },
60 # This target exports a hard dependency because it generates header 62 # This target exports a hard dependency because it generates header
61 # files. 63 # files.
62 'hard_dependency': 1, 64 'hard_dependency': 1,
63 } 65 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | tools/json_schema_compiler/cc_generator.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698