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

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: merge with ToT 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
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/app/policy/policy_templates.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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': [
{
« no previous file with comments | « chrome/app/breakpad_win.cc ('k') | chrome/app/policy/policy_templates.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698