| 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           'includes': [ '../../../build/grit_target.gypi' ], | 
|   20           'actions': [ |   20           'actions': [ | 
|   21             { |   21             { | 
|   22               'action_name': 'policy_templates', |   22               'action_name': 'policy_templates', | 
|   23               'variables': { |   23               'includes': [ '../../../build/grit_action.gypi' ], | 
|   24                 'conditions': [ |  | 
|   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             }, |   24             }, | 
|   55           ], |   25           ], | 
|   56           'direct_dependent_settings': { |  | 
|   57             'include_dirs': [ |  | 
|   58               '<(grit_out_dir)', |  | 
|   59             ], |  | 
|   60           }, |  | 
|   61           'conditions': [ |   26           'conditions': [ | 
|   62             ['OS=="win"', { |   27             ['OS=="win"', { | 
|   63               'variables': { |   28               'variables': { | 
|   64                 'version_path': '<(grit_out_dir)/app/policy/VERSION', |   29                 'version_path': '<(grit_out_dir)/app/policy/VERSION', | 
 |   30                 'template_files': [ | 
 |   31                   '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(grit_grd
     _file))' | 
 |   32                 ], | 
|   65               }, |   33               }, | 
|   66               'actions': [ |   34               'actions': [ | 
|   67                 { |   35                 { | 
|   68                   'action_name': 'add_version', |   36                   'action_name': 'add_version', | 
|   69                   'inputs': ['../../VERSION'], |   37                   'inputs': ['../../VERSION'], | 
|   70                   'outputs': ['<(version_path)'], |   38                   'outputs': ['<(version_path)'], | 
|   71                   'action': ['cp', '<@(_inputs)', '<@(_outputs)'], |   39                   'action': ['cp', '<@(_inputs)', '<@(_outputs)'], | 
|   72                 }, |   40                 }, | 
|   73                 { |   41                 { | 
|   74                   # Add all the templates generated at the previous step into |   42                   # Add all the templates generated at the previous step into | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
|   91                     '<(zip_script)', |   59                     '<(zip_script)', | 
|   92                     '<@(_outputs)', |   60                     '<@(_outputs)', | 
|   93                     '<(grit_out_dir)/app/policy', |   61                     '<(grit_out_dir)/app/policy', | 
|   94                     '<@(template_files)', |   62                     '<@(template_files)', | 
|   95                     '<(version_path)' |   63                     '<(version_path)' | 
|   96                   ], |   64                   ], | 
|   97                   'message': 'Packing generated templates into <(_outputs)', |   65                   'message': 'Packing generated templates into <(_outputs)', | 
|   98                 } |   66                 } | 
|   99               ] |   67               ] | 
|  100             }], |   68             }], | 
|  101             ['OS=="win"', { |   69           ],  # conditions | 
|  102               'dependencies': ['../build/win/system.gyp:cygwin'], |  | 
|  103             }], |  | 
|  104           ], |  | 
|  105         }, |   70         }, | 
|  106       ],  # 'targets' |   71       ],  # 'targets' | 
|  107     }],  # OS=="win" or OS=="mac" or OS=="linux" |   72     }],  # OS=="win" or OS=="mac" or OS=="linux" | 
|  108     ['OS=="mac"', { |   73     ['OS=="mac"', { | 
|  109       'targets': [ |   74       'targets': [ | 
|  110         { |   75         { | 
|  111           # This is the bundle of the manifest file of Chrome. |   76           # This is the bundle of the manifest file of Chrome. | 
|  112           # It contains the manifest file and its string tables. |   77           # It contains the manifest file and its string tables. | 
|  113           'target_name': 'chrome_manifest_bundle', |   78           'target_name': 'chrome_manifest_bundle', | 
|  114           'type': 'loadable_module', |   79           'type': 'loadable_module', | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  176       ] |  141       ] | 
|  177     }] |  142     }] | 
|  178   ],  # 'conditions' |  143   ],  # 'conditions' | 
|  179 } |  144 } | 
|  180  |  145  | 
|  181 # Local Variables: |  146 # Local Variables: | 
|  182 # tab-width:2 |  147 # tab-width:2 | 
|  183 # indent-tabs-mode:nil |  148 # indent-tabs-mode:nil | 
|  184 # End: |  149 # End: | 
|  185 # vim: set expandtab tabstop=2 shiftwidth=2: |  150 # vim: set expandtab tabstop=2 shiftwidth=2: | 
| OLD | NEW |