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

Unified Diff: build/json_features.gypi

Issue 2151583003: [Extensions] Add extension feature generation code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GYP support 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
Index: build/json_features.gypi
diff --git a/build/json_features.gypi b/build/json_features.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..23e79005d812d7b20ae9e22b850fd8cb245061ba
--- /dev/null
+++ b/build/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_dir)/feature_compiler.py',
Dirk Pranke 2016/07/14 23:16:36 '<(compiler_script)' ?
Devlin 2016/07/15 16:19:07 Done.
+ ],
+ '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,
+}

Powered by Google App Engine
This is Rietveld 408576698