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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 183763032: Add an implementation path option to json_schema_compiler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add default impl_dir Created 6 years, 10 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 | « build/json_schema_compile.gypi ('k') | tools/json_schema_compiler/cpp_bundle_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index c79beaec767644b1913c30fc7d4cfbddfb79e407..1773d4b136123b24db6a58f1330554adb9636ffc 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -38,7 +38,8 @@ def GenerateSchema(generator,
root,
destdir,
root_namespace,
- dart_overrides_dir):
+ dart_overrides_dir,
+ impl_dir):
schema_loader = SchemaLoader(
os.path.dirname(os.path.relpath(os.path.normpath(filenames[0]), root)),
os.path.dirname(filenames[0]))
@@ -82,7 +83,8 @@ def GenerateSchema(generator,
api_defs,
type_generator,
root_namespace,
- namespace.source_file_dir)
+ namespace.source_file_dir,
+ impl_dir)
generators = [
('generated_api.cc', cpp_bundle_generator.api_cc_generator),
('generated_api.h', cpp_bundle_generator.api_h_generator),
@@ -138,6 +140,8 @@ if __name__ == '__main__':
' %s' % GENERATORS)
parser.add_option('-D', '--dart-overrides-dir', dest='dart_overrides_dir',
help='Adds custom dart from files in the given directory (Dart only).')
+ parser.add_option('-i', '--impl-dir', dest='impl_dir',
+ help='The root path of all API implementations')
(opts, filenames) = parser.parse_args()
@@ -151,6 +155,7 @@ if __name__ == '__main__':
"Unless in bundle mode, only one file can be specified at a time.")
result = GenerateSchema(opts.generator, filenames, opts.root, opts.destdir,
- opts.namespace, opts.dart_overrides_dir)
+ opts.namespace, opts.dart_overrides_dir,
+ opts.impl_dir)
if not opts.destdir:
print result
« no previous file with comments | « build/json_schema_compile.gypi ('k') | tools/json_schema_compiler/cpp_bundle_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698