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

Unified Diff: build/api_gen.gypi

Issue 9114036: Code generation for extensions api (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: added generated files, removed trailing whitespace 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
Index: build/api_gen.gypi
diff --git a/build/api_gen.gypi b/build/api_gen.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..f92b2d49f213dad4c8119567c8beb349296e7850
--- /dev/null
+++ b/build/api_gen.gypi
@@ -0,0 +1,54 @@
+# Copyright (c) 2011 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': {
+ 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
not at google - send to devlin 2012/01/12 06:01:05 you'll need to rename this file json_schema_compil
calamity 2012/01/12 22:59:20 Done.
+ '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)/generate_cc.py',
+ '<(api_gen_dir)/generate_h.py',
+ '<@(json_schema_files)',
+ ],
+ 'outputs': [
+ '<(cc_dir)/<(RULE_INPUT_ROOT)_api.cc',
+ '<(cc_dir)/<(RULE_INPUT_ROOT)_api.h',
+ ],
+ 'action': [
+ 'python',
+ '<(api_gen)',
+ '<(RULE_INPUT_PATH)',
+ '--root=<(DEPTH)',
+ '--destdir=<(cc_root)',
+ '--namespace=<(root_namespace)',
+ '<@(json_schema_files)',
+ ],
+ 'message': 'Generating C++ code from <(RULE_INPUT_PATH) jsons',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ 'include_dirs': [
+ '<(cc_root)',
+ '<(DEPTH)',
+ ],
+ 'dependencies':[
+ '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(cc_root)',
+ ]
+ },
+ # This target exports a hard dependency because it generates header
+ # files.
+ 'hard_dependency': 1,
+}

Powered by Google App Engine
This is Rietveld 408576698