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

Unified Diff: tools/json_schema_compiler/json_features.gypi

Issue 2151583003: [Extensions] Add extension feature generation code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include fix Created 4 years, 5 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 | « tools/json_schema_compiler/json_features.gni ('k') | tools/json_schema_compiler/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/json_features.gypi
diff --git a/tools/json_schema_compiler/json_features.gypi b/tools/json_schema_compiler/json_features.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..7b24d3aacdfe1a6957ff4f9cc3fbb101c9394045
--- /dev/null
+++ b/tools/json_schema_compiler/json_features.gypi
@@ -0,0 +1,63 @@
+# Copyright 2016 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:
+ # in_files:
+ # An array of json files from which to generate the feature provider.
+ # out_dir:
+ # The directory to put the generated code in under gen/.
+ # out_base_filename:
+ # The base filename to use for the generated feature provider; .h and
+ # .cc will be appended.
+ # feature_class:
+ # The name of the class to use for features, e.g. APIFeature.
+ # provider_class:
+ # The name of the class to use for the feature provider, e.g.
+ # APIFeatureProvider
+ 'compiler_dir': '<(DEPTH)/tools/json_schema_compiler',
+ 'compiler_script': '<(compiler_dir)/feature_compiler.py',
+ },
+ 'actions': [
+ {
+ # GN version: json_features.gni
+ 'action_name': 'genfeatures',
+ 'msvs_external_rule': 1,
+ 'extension': 'json',
+ 'inputs': [
+ '<(compiler_dir)/code.py',
+ '<(compiler_script)',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/<(out_dir)/<(out_base_filename).cc',
+ '<(SHARED_INTERMEDIATE_DIR)/<(out_dir)/<(out_base_filename).h',
+ ],
+ 'action': [
+ 'python',
+ '<(compiler_script)',
+ '<(DEPTH)',
+ '<(feature_class)',
+ '<(provider_class)',
+ '<(SHARED_INTERMEDIATE_DIR)/<(out_dir)',
+ '<(out_base_filename)',
+ '<@(in_files)',
+ ],
+ 'message': 'Generating C++ code for json feature files',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)',
+ '<(DEPTH)',
+ ],
+ '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 | « tools/json_schema_compiler/json_features.gni ('k') | tools/json_schema_compiler/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698