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

Unified Diff: build/json_schema_compile.gypi

Issue 9114036: Code generation for extensions api (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: windows path fix Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/permissions/permissions_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/json_schema_compile.gypi
diff --git a/build/json_schema_compile.gypi b/build/json_schema_compile.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..940e65cf3c9f6d7d32ab2b3c66000f9afca26df6
--- /dev/null
+++ b/build/json_schema_compile.gypi
@@ -0,0 +1,59 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ # When including this gypi, the following variables must be set:
+ # json_schema_files: an array of json files that comprise the api model.
+ # cc_dir: path to generated files
+ # root_namespace: the C++ namespace that all generated files go under
+ 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
+ 'api_gen': '<(api_gen_dir)/compiler.py',
+ },
+ 'rules': [
+ {
+ 'rule_name': 'genapi',
+ 'extension': 'json',
+ 'inputs': [
+ '<(api_gen_dir)/code.py',
+ '<(api_gen_dir)/compiler.py',
+ '<(api_gen_dir)/model.py',
+ '<(api_gen_dir)/cc_generator.py',
+ '<(api_gen_dir)/h_generator.py',
+ '<(api_gen_dir)/cpp_type_generator.py',
+ '<@(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)',
+ '<@(json_schema_files)',
+ ],
+ 'message': 'Generating C++ code from <(RULE_INPUT_PATH) jsons',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)',
+ '<(DEPTH)',
+ ],
+ 'dependencies':[
+ '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)',
+ ]
+ },
+ # This target exports a hard dependency because it generates header
+ # files.
+ 'hard_dependency': 1,
+}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/permissions/permissions_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698