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 'generate_policy_source_script': |
| 8 ['python', 'tools/build/generate_policy_source.py'], |
| 9 }, |
| 10 'target_defaults': { |
| 11 'variables': { |
| 12 'policy_target': 0, |
| 13 }, |
| 14 'target_conditions': [ |
| 15 [ 'policy_target==1', { |
| 16 'include_dirs': [ |
| 17 '<(policy_out_dir)', |
| 18 ], |
| 19 'actions': [ |
| 20 { |
| 21 'variables': |
| 22 { |
| 23 'policy_constant_header': |
| 24 '<(policy_out_dir)/policy/policy_constants.h', |
| 25 'policy_constant_source': |
| 26 '<(policy_out_dir)/policy/policy_constants.cc', |
| 27 'configuration_policy_type_header': |
| 28 '<(policy_out_dir)/policy/configuration_policy_type.h', |
| 29 }, |
| 30 'inputs': [ |
| 31 'policy_templates.json', |
| 32 '../../tools/build/generate_policy_source.py' |
| 33 ], |
| 34 'outputs': [ |
| 35 '<(policy_constant_header)', |
| 36 '<(policy_constant_source)', |
| 37 '<(configuration_policy_type_header)', |
| 38 ], |
| 39 'action_name': 'generate_policy_source', |
| 40 'action': [ |
| 41 '<@(generate_policy_source_script)', |
| 42 '--policy-constants-header=<(policy_constant_header)', |
| 43 '--policy-constants-source=<(policy_constant_source)', |
| 44 '--policy-type-header=<(configuration_policy_type_header)', |
| 45 '<(OS)', |
| 46 '<@(_inputs)', |
| 47 ], |
| 48 'message': 'Generating policy source', |
| 49 'process_outputs_as_sources': 1, |
| 50 }, |
| 51 ], |
| 52 }, ], |
| 53 ], |
| 54 }, |
| 55 'targets': [ |
| 56 { |
| 57 'target_name': 'policy', |
| 58 'type': '<(library)', |
| 59 'include_dirs': [ |
| 60 '<(policy_out_dir)', |
| 61 ], |
| 62 'variables': { |
| 63 'policy_target': 1, |
| 64 }, |
| 65 }, |
| 66 ], |
6 'conditions': [ | 67 'conditions': [ |
| 68 ['OS=="win"', { |
| 69 'targets': [ |
| 70 { |
| 71 'target_name': 'policy_win64', |
| 72 'type': '<(library)', |
| 73 'variables': { |
| 74 'policy_target': 1, |
| 75 }, |
| 76 'configurations': { |
| 77 'Common_Base': { |
| 78 'msvs_target_platform': 'x64', |
| 79 }, |
| 80 }, |
| 81 }, |
| 82 ], |
| 83 }], |
7 ['OS=="win" or OS=="mac" or OS=="linux"', { | 84 ['OS=="win" or OS=="mac" or OS=="linux"', { |
8 'targets': [ | 85 'targets': [ |
9 { | 86 { |
10 # policy_templates has different inputs and outputs, so it can't use | 87 # policy_templates has different inputs and outputs, so it can't use |
11 # the rules of chrome_strings | 88 # the rules of chrome_strings |
12 'target_name': 'policy_templates', | 89 'target_name': 'policy_templates', |
13 'type': 'none', | 90 'type': 'none', |
14 'variables': { | 91 'variables': { |
15 'grd_path': 'policy_templates.grd', | 92 'grd_path': 'policy_templates.grd', |
16 'template_files': [ | 93 'template_files': [ |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 ] | 248 ] |
172 }] | 249 }] |
173 ], # 'conditions' | 250 ], # 'conditions' |
174 } | 251 } |
175 | 252 |
176 # Local Variables: | 253 # Local Variables: |
177 # tab-width:2 | 254 # tab-width:2 |
178 # indent-tabs-mode:nil | 255 # indent-tabs-mode:nil |
179 # End: | 256 # End: |
180 # vim: set expandtab tabstop=2 shiftwidth=2: | 257 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |