summaryrefslogtreecommitdiffstats
path: root/build/json_schema_compile.gypi
diff options
context:
space:
mode:
authormiket@chromium.org <miket@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 02:33:35 +0000
committermiket@chromium.org <miket@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-07 02:33:35 +0000
commit750b83600136c3b9bfaf33bb60ec61c41010a150 (patch)
treeaead05297ea1f7ba6840c414917be091a5970dfb /build/json_schema_compile.gypi
parent8a59a087de2604becfc5fb4fb691b45c37ca8795 (diff)
downloadchromium_src-750b83600136c3b9bfaf33bb60ec61c41010a150.zip
chromium_src-750b83600136c3b9bfaf33bb60ec61c41010a150.tar.gz
chromium_src-750b83600136c3b9bfaf33bb60ec61c41010a150.tar.bz2
- Extend compiler.py to recognize .idl files.
- Extend .gyp to pass certain .idl files to compiler.py. - Implement a translator taking IDL parser output and creating a schema that the JSON compiler recognizes. - Convert one API to IDL using asargent's JSON cat JSON-to-IDL converter, and adapt API's implementation to use the newly generated output. TEST=no changes BUG=none Review URL: http://codereview.chromium.org/9600050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/json_schema_compile.gypi')
-rw-r--r--build/json_schema_compile.gypi41
1 files changed, 40 insertions, 1 deletions
diff --git a/build/json_schema_compile.gypi b/build/json_schema_compile.gypi
index 3abecf3..b44fe91 100644
--- a/build/json_schema_compile.gypi
+++ b/build/json_schema_compile.gypi
@@ -23,9 +23,48 @@
'<(api_gen_dir)/cc_generator.py',
'<(api_gen_dir)/code.py',
'<(api_gen_dir)/compiler.py',
+ '<(api_gen_dir)/cpp_type_generator.py',
'<(api_gen_dir)/cpp_util.py',
+ '<(api_gen_dir)/h_generator.py',
+ '<(api_gen_dir)/json_schema.py',
+ '<(api_gen_dir)/model.py',
+ '<(api_gen_dir)/util.cc',
+ '<(api_gen_dir)/util.h',
+ '<(api_gen_dir)/util_cc_helper.py',
+ # TODO(calamity): uncomment this when gyp on windows behaves like other
+ # platforms. List expansions of filepaths in inputs expand to different
+ # things.
+ # '<@(json_schema_files)',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
+ '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
+ ],
+ 'action': [
+ 'python',
+ '<(api_gen)',
+ '<(RULE_INPUT_PATH)',
+ '--root=<(DEPTH)',
+ '--destdir=<(SHARED_INTERMEDIATE_DIR)',
+ '--namespace=<(root_namespace)',
+ ],
+ 'message': 'Generating C++ code from <(RULE_INPUT_PATH) json files',
+ 'process_outputs_as_sources': 1,
+ },
+ {
+ 'rule_name': 'genapi_idl',
+ 'extension': 'idl',
+ 'inputs': [
+ '<(api_gen_dir)/any.cc',
+ '<(api_gen_dir)/any.h',
+ '<(api_gen_dir)/any_helper.py',
+ '<(api_gen_dir)/cc_generator.py',
+ '<(api_gen_dir)/code.py',
+ '<(api_gen_dir)/compiler.py',
'<(api_gen_dir)/cpp_type_generator.py',
+ '<(api_gen_dir)/cpp_util.py',
'<(api_gen_dir)/h_generator.py',
+ '<(api_gen_dir)/idl_schema.py',
'<(api_gen_dir)/model.py',
'<(api_gen_dir)/util.cc',
'<(api_gen_dir)/util.h',
@@ -47,7 +86,7 @@
'--destdir=<(SHARED_INTERMEDIATE_DIR)',
'--namespace=<(root_namespace)',
],
- 'message': 'Generating C++ code from <(RULE_INPUT_PATH) jsons',
+ 'message': 'Generating C++ code from <(RULE_INPUT_PATH) IDL files',
'process_outputs_as_sources': 1,
},
],