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

Unified Diff: chrome/app/policy/policy_templates.gypi

Issue 6002015: Policy: generate boilerplate policy type and constant code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks and right diff Created 9 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: chrome/app/policy/policy_templates.gypi
diff --git a/chrome/app/policy/policy_templates.gypi b/chrome/app/policy/policy_templates.gypi
index 4f41c3a036d37dadbb3278104edcc409184140d1..656a961fbd2ef01ade18db4a456fbd79312902f0 100644
--- a/chrome/app/policy/policy_templates.gypi
+++ b/chrome/app/policy/policy_templates.gypi
@@ -3,6 +3,73 @@
# found in the LICENSE file.
{
+ 'targets': [
+ {
+ 'target_name': 'policy_source',
+ 'type' : 'none',
+ 'variables':
+ {
+ 'generate_policy_source_script':
+ 'tools/build/generate_policy_source.py',
gfeher 2011/01/11 15:43:58 Nit suggestion: make this ['python', 'tools/build/
danno 2011/01/20 17:18:32 Done.
+ },
+ 'actions': [
+ {
+ 'inputs': [
+ 'policy_templates.json',
+ ],
+ 'outputs': [
+ '<(policy_out_dir)/chrome/common/policy_constants.h',
+ ],
+ 'action_name': 'generate_policy_constant_header',
+ 'action': [
+ 'python',
+ '<(generate_policy_source_script)',
+ '--policy-constants-header',
+ '<@(_inputs)',
+ '<@(_outputs)',
+ ],
+ 'message': 'Generating policy constant header from template',
+ 'process_outputs_as_sources': 1,
+ },
+ {
+ 'inputs': [
+ 'policy_templates.json',
+ ],
+ 'outputs': [
+ '<(policy_out_dir)/chrome/common/policy_constants.cc',
+ ],
+ 'action_name': 'generate_policy_constant_source',
+ 'action': [
+ 'python',
+ '<(generate_policy_source_script)',
+ '--policy-constants-source',
+ '<@(_inputs)',
+ '<@(_outputs)',
+ ],
+ 'message': 'Generating policy constant source from template',
+ 'process_outputs_as_sources': 1,
+ },
+ {
+ 'inputs': [
+ 'policy_templates.json',
+ ],
+ 'outputs': [
+ '<(policy_out_dir)/chrome/browser/policy/configuration_policy_type.h',
+ ],
+ 'action_name': 'generate_policy_type_enumeration',
+ 'action': [
+ 'python',
+ '<(generate_policy_source_script)',
+ '--policy-type-header',
+ '<@(_inputs)',
+ '<@(_outputs)',
+ ],
+ 'message': 'Generating policy enumeration header from template',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ },
+ ],
'conditions': [
['OS=="win" or OS=="mac" or OS=="linux"', {
'targets': [

Powered by Google App Engine
This is Rietveld 408576698