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

Side by Side Diff: build/json_to_struct.gypi

Issue 11377049: Moving prepopulated search engines to a JSON file. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Unit tests for python and C++. Added build step. Created 8 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6 'variables': {
7 # When including this gypi, the following variables must be set:
8 # json_schema_file: a json file that comprise the structure model.
not at google - send to devlin 2012/11/13 20:28:07 Heh, well unless you're actually planning to make
beaudoin 2012/11/13 21:42:04 I'm actually using a schema -- just my own format.
not at google - send to devlin 2012/11/13 22:12:05 Yes I think that would be less confusing. :) perha
beaudoin 2012/11/14 17:34:12 Done.
9 # namespace: the C++ namespace that all generated files go under
10 # cc_dir: path to generated files
11 # Functions and namespaces can be excluded by setting "nocompile" to true.
12 'struct_gen_dir': '<(DEPTH)/tools/json_to_struct',
13 'struct_gen': '<(struct_gen_dir)/json_to_struct.py',
14 },
15 'rules': [
16 {
17 'rule_name': 'genstaticinit',
18 'extension': 'json',
19 'inputs': [
20 '<(struct_gen_dir)/element_generator.py',
21 '<(struct_gen_dir)/json_to_struct.py',
22 '<(struct_gen_dir)/struct_generator.py',
23 '<(json_schema_file)',
24 ],
25 'outputs': [
26 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
27 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
28 ],
29 'action': [
30 'python',
31 '<(struct_gen)',
32 '<(RULE_INPUT_PATH)',
33 '--destdir=<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)',
34 '--namespace=<(namespace)',
35 '--schema=<(json_schema_file)',
36 ],
37 'message': 'Generating C++ static initializers from <(RULE_INPUT_PATH)',
38 'process_outputs_as_sources': 1,
39 },
40 ],
41 'include_dirs': [
42 '<(SHARED_INTERMEDIATE_DIR)',
43 '<(DEPTH)',
44 ],
45 # This target exports a hard dependency because it generates header
46 # files.
47 'hard_dependency': 1,
48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698