Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 'conditions': [ | 6 'conditions': [ |
| 7 ['OS=="win" or OS=="mac" or OS=="linux"', { | 7 ['OS=="win" or OS=="mac" or OS=="linux"', { |
| 8 'targets': [ | 8 'targets': [ |
| 9 { | 9 { |
| 10 # policy_templates has different inputs and outputs, so it can't use | 10 # policy_templates has different inputs and outputs, so it can't use |
| 11 # the rules of chrome_strings | 11 # the rules of chrome_strings |
| 12 'target_name': 'policy_templates', | 12 'target_name': 'policy_templates', |
| 13 'type': 'none', | 13 'type': 'none', |
| 14 'variables': { | 14 'variables': { |
| 15 'grd_path': 'policy_templates.grd', | 15 'grit_grd_file': 'policy_templates.grd', |
| 16 'template_files': [ | 16 'grit_info_cmd': ['python', '<(DEPTH)/tools/grit/grit_info.py', |
| 17 '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(grd_path))' | 17 '<@(grit_defines)'], |
| 18 ], | |
| 19 }, | 18 }, |
| 19 # Grit target boiler plate. | |
| 20 'includes': [ '../../../build/grit_target.gypi' ], | |
|
tony
2011/03/25 18:07:04
Can we use <(DEPTH)?
TVL
2011/03/25 18:15:53
Nope, includes happen before variable expansion.
| |
| 20 'actions': [ | 21 'actions': [ |
| 21 { | 22 { |
| 22 'action_name': 'policy_templates', | 23 'action_name': 'policy_templates', |
| 23 'variables': { | 24 # Grit action boiler plate. |
| 24 'conditions': [ | 25 'includes': [ '../../../build/grit_action.gypi' ], |
| 25 ['branding=="Chrome"', { | |
| 26 # TODO(mmoss) The .grd files look for _google_chrome, but | |
| 27 # for consistency they should look for GOOGLE_CHROME_BUILD | |
| 28 # like C++. | |
| 29 # Clean this up when Windows moves to gyp. | |
| 30 'chrome_build': '_google_chrome', | |
| 31 }, { # else: branding!="Chrome" | |
| 32 'chrome_build': '_chromium', | |
| 33 }], | |
| 34 ], | |
| 35 }, | |
| 36 'inputs': [ | |
| 37 '<!@(<(grit_info_cmd) --inputs <(grd_path))', | |
| 38 ], | |
| 39 'outputs': [ | |
| 40 '<@(template_files)' | |
| 41 ], | |
| 42 'action': [ | |
| 43 '<@(grit_cmd)', | |
| 44 '-i', '<(grd_path)', 'build', | |
| 45 '-o', '<(grit_out_dir)', | |
| 46 '<@(grit_defines)', | |
| 47 ], | |
| 48 'conditions': [ | |
| 49 ['OS == "mac"', { | |
| 50 'action': ['-D', 'mac_bundle_id=<(mac_bundle_id)'], | |
| 51 }], | |
| 52 ], | |
| 53 'message': 'Generating policy templates from <(grd_path)', | |
| 54 }, | 26 }, |
| 55 ], | 27 ], |
| 56 'direct_dependent_settings': { | |
| 57 'include_dirs': [ | |
| 58 '<(grit_out_dir)', | |
| 59 ], | |
| 60 }, | |
| 61 'conditions': [ | 28 'conditions': [ |
| 62 ['OS=="win"', { | 29 ['OS=="win"', { |
| 63 'variables': { | 30 'variables': { |
| 64 'version_path': '<(grit_out_dir)/app/policy/VERSION', | 31 'version_path': '<(grit_out_dir)/app/policy/VERSION', |
| 32 'template_files': [ | |
| 33 '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(grit_grd _file))' | |
| 34 ], | |
| 65 }, | 35 }, |
| 66 'actions': [ | 36 'actions': [ |
| 67 { | 37 { |
| 68 'action_name': 'add_version', | 38 'action_name': 'add_version', |
| 69 'inputs': ['../../VERSION'], | 39 'inputs': ['../../VERSION'], |
| 70 'outputs': ['<(version_path)'], | 40 'outputs': ['<(version_path)'], |
| 71 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | 41 'action': ['cp', '<@(_inputs)', '<@(_outputs)'], |
| 72 }, | 42 }, |
| 73 { | 43 { |
| 74 # Add all the templates generated at the previous step into | 44 # Add all the templates generated at the previous step into |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 91 '<(zip_script)', | 61 '<(zip_script)', |
| 92 '<@(_outputs)', | 62 '<@(_outputs)', |
| 93 '<(grit_out_dir)/app/policy', | 63 '<(grit_out_dir)/app/policy', |
| 94 '<@(template_files)', | 64 '<@(template_files)', |
| 95 '<(version_path)' | 65 '<(version_path)' |
| 96 ], | 66 ], |
| 97 'message': 'Packing generated templates into <(_outputs)', | 67 'message': 'Packing generated templates into <(_outputs)', |
| 98 } | 68 } |
| 99 ] | 69 ] |
| 100 }], | 70 }], |
| 101 ['OS=="win"', { | 71 ], # conditions |
| 102 'dependencies': ['../build/win/system.gyp:cygwin'], | |
| 103 }], | |
| 104 ], | |
| 105 }, | 72 }, |
| 106 ], # 'targets' | 73 ], # 'targets' |
| 107 }], # OS=="win" or OS=="mac" or OS=="linux" | 74 }], # OS=="win" or OS=="mac" or OS=="linux" |
| 108 ['OS=="mac"', { | 75 ['OS=="mac"', { |
| 109 'targets': [ | 76 'targets': [ |
| 110 { | 77 { |
| 111 # This is the bundle of the manifest file of Chrome. | 78 # This is the bundle of the manifest file of Chrome. |
| 112 # It contains the manifest file and its string tables. | 79 # It contains the manifest file and its string tables. |
| 113 'target_name': 'chrome_manifest_bundle', | 80 'target_name': 'chrome_manifest_bundle', |
| 114 'type': 'loadable_module', | 81 'type': 'loadable_module', |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 176 ] | 143 ] |
| 177 }] | 144 }] |
| 178 ], # 'conditions' | 145 ], # 'conditions' |
| 179 } | 146 } |
| 180 | 147 |
| 181 # Local Variables: | 148 # Local Variables: |
| 182 # tab-width:2 | 149 # tab-width:2 |
| 183 # indent-tabs-mode:nil | 150 # indent-tabs-mode:nil |
| 184 # End: | 151 # End: |
| 185 # vim: set expandtab tabstop=2 shiftwidth=2: | 152 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |