OLD | NEW |
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
| 6 'variables': { |
| 7 'policy_out_dir': '<(SHARED_INTERMEDIATE_DIR)/policy', |
| 8 'generate_policy_source_script': |
| 9 ['python', 'tools/build/generate_policy_source.py'], |
| 10 }, |
| 11 'target_defaults': { |
| 12 'variables': { |
| 13 'policy_target': 0, |
| 14 }, |
| 15 'target_conditions': [ |
| 16 [ 'policy_target==1', { |
| 17 'include_dirs': [ |
| 18 '<(policy_out_dir)', |
| 19 ], |
| 20 'actions': [ |
| 21 { |
| 22 'variables': |
| 23 { |
| 24 'policy_constant_header': |
| 25 '<(policy_out_dir)/policy/policy_constants.h', |
| 26 'policy_constant_source': |
| 27 '<(policy_out_dir)/policy/policy_constants.cc', |
| 28 'configuration_policy_type_header': |
| 29 '<(policy_out_dir)/policy/configuration_policy_type.h', |
| 30 }, |
| 31 'inputs': [ |
| 32 'policy_templates.json', |
| 33 '../../tools/build/generate_policy_source.py' |
| 34 ], |
| 35 'outputs': [ |
| 36 '<(policy_constant_header)', |
| 37 '<(policy_constant_source)', |
| 38 '<(configuration_policy_type_header)', |
| 39 ], |
| 40 'action_name': 'generate_policy_source', |
| 41 'action': [ |
| 42 '<@(generate_policy_source_script)', |
| 43 '--policy-constants-header=<(policy_constant_header)', |
| 44 '--policy-constants-source=<(policy_constant_source)', |
| 45 '--policy-type-header=<(configuration_policy_type_header)', |
| 46 '<(OS)', |
| 47 '<@(_inputs)', |
| 48 ], |
| 49 'message': 'Generating policy source', |
| 50 'process_outputs_as_sources': 1, |
| 51 }, |
| 52 ], |
| 53 }, ], |
| 54 ], |
| 55 }, |
| 56 'targets': [ |
| 57 { |
| 58 'target_name': 'policy', |
| 59 'type': '<(library)', |
| 60 'include_dirs': [ |
| 61 '<(policy_out_dir)', |
| 62 ], |
| 63 'direct_dependent_settings': { |
| 64 'include_dirs': [ |
| 65 '<(SHARED_INTERMEDIATE_DIR)/policy' |
| 66 ], |
| 67 }, |
| 68 'variables': { |
| 69 'policy_target': 1, |
| 70 }, |
| 71 }, |
| 72 ], |
6 'conditions': [ | 73 'conditions': [ |
| 74 ['OS=="win"', { |
| 75 'targets': [ |
| 76 { |
| 77 'target_name': 'policy_win64', |
| 78 'type': '<(library)', |
| 79 'variables': { |
| 80 'policy_target': 1, |
| 81 }, |
| 82 'direct_dependent_settings': { |
| 83 'include_dirs': [ |
| 84 '<(SHARED_INTERMEDIATE_DIR)/policy' |
| 85 ], |
| 86 }, |
| 87 'configurations': { |
| 88 'Common_Base': { |
| 89 'msvs_target_platform': 'x64', |
| 90 }, |
| 91 }, |
| 92 }, |
| 93 ], |
| 94 }], |
7 ['OS=="win" or OS=="mac" or OS=="linux"', { | 95 ['OS=="win" or OS=="mac" or OS=="linux"', { |
8 'targets': [ | 96 'targets': [ |
9 { | 97 { |
10 # policy_templates has different inputs and outputs, so it can't use | 98 # policy_templates has different inputs and outputs, so it can't use |
11 # the rules of chrome_strings | 99 # the rules of chrome_strings |
12 'target_name': 'policy_templates', | 100 'target_name': 'policy_templates', |
13 'type': 'none', | 101 'type': 'none', |
14 'variables': { | 102 'variables': { |
15 'grd_path': 'policy_templates.grd', | 103 'grd_path': 'policy_templates.grd', |
16 'template_files': [ | 104 'template_files': [ |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 ] | 259 ] |
172 }] | 260 }] |
173 ], # 'conditions' | 261 ], # 'conditions' |
174 } | 262 } |
175 | 263 |
176 # Local Variables: | 264 # Local Variables: |
177 # tab-width:2 | 265 # tab-width:2 |
178 # indent-tabs-mode:nil | 266 # indent-tabs-mode:nil |
179 # End: | 267 # End: |
180 # vim: set expandtab tabstop=2 shiftwidth=2: | 268 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |