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..b96e13882c17603b857332be2ed4d40241a55726 100644 |
--- a/chrome/app/policy/policy_templates.gypi |
+++ b/chrome/app/policy/policy_templates.gypi |
@@ -3,7 +3,95 @@ |
# found in the LICENSE file. |
{ |
+ 'variables': { |
+ 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', |
+ 'generate_policy_source_script': |
+ ['python', 'tools/build/generate_policy_source.py'], |
+ }, |
+ 'target_defaults': { |
+ 'variables': { |
+ 'policy_target': 0, |
+ }, |
+ 'target_conditions': [ |
+ [ 'policy_target==1', { |
+ 'include_dirs': [ |
+ '<(policy_out_dir)', |
+ ], |
+ 'actions': [ |
+ { |
+ 'variables': |
+ { |
+ 'policy_constant_header': |
+ '<(policy_out_dir)/policy/policy_constants.h', |
+ 'policy_constant_source': |
+ '<(policy_out_dir)/policy/policy_constants.cc', |
+ 'configuration_policy_type_header': |
+ '<(policy_out_dir)/policy/configuration_policy_type.h', |
+ }, |
+ 'inputs': [ |
+ 'policy_templates.json', |
+ '../../tools/build/generate_policy_source.py' |
+ ], |
+ 'outputs': [ |
+ '<(policy_constant_header)', |
+ '<(policy_constant_source)', |
+ '<(configuration_policy_type_header)', |
+ ], |
+ 'action_name': 'generate_policy_source', |
+ 'action': [ |
+ '<@(generate_policy_source_script)', |
+ '--policy-constants-header=<(policy_constant_header)', |
+ '--policy-constants-source=<(policy_constant_source)', |
+ '--policy-type-header=<(configuration_policy_type_header)', |
+ '<(OS)', |
+ '<@(_inputs)', |
+ ], |
+ 'message': 'Generating policy source', |
+ 'process_outputs_as_sources': 1, |
+ }, |
+ ], |
+ }, ], |
+ ], |
+ }, |
+ 'targets': [ |
+ { |
+ 'target_name': 'policy', |
+ 'type': '<(library)', |
+ 'include_dirs': [ |
+ '<(policy_out_dir)', |
+ ], |
+ 'direct_dependent_settings': { |
+ 'include_dirs': [ |
+ '<(SHARED_INTERMEDIATE_DIR)/policy' |
+ ], |
+ }, |
+ 'variables': { |
+ 'policy_target': 1, |
+ }, |
+ }, |
+ ], |
'conditions': [ |
+ ['OS=="win"', { |
+ 'targets': [ |
+ { |
+ 'target_name': 'policy_win64', |
+ 'type': '<(library)', |
+ 'variables': { |
+ 'policy_target': 1, |
+ }, |
+ 'direct_dependent_settings': { |
+ 'include_dirs': [ |
+ '<(SHARED_INTERMEDIATE_DIR)/policy' |
+ ], |
+ }, |
+ 'configurations': { |
+ 'Common_Base': { |
+ 'msvs_target_platform': 'x64', |
+ }, |
+ }, |
+ }, |
+ ], |
+ }], |
['OS=="win" or OS=="mac" or OS=="linux"', { |
'targets': [ |
{ |