Home | History | Annotate | Download | only in devtools
      1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 {
      6   'targets': [
      7     {
      8       'target_name': 'devtools_resources',
      9       'type': 'none',
     10       'dependencies': [
     11         '../../../third_party/WebKit/public/blink_devtools.gyp:blink_generate_devtools_grd',
     12       ],
     13       'variables': {
     14         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit',
     15       },
     16       'actions': [
     17         {
     18           'action_name': 'devtools_resources',
     19           # This can't use build/grit_action.gypi because the grd file
     20           # is generated at build time, so the trick of using grit_info to get
     21           # the real inputs/outputs at GYP time isn't possible.
     22           'variables': {
     23             'grit_cmd': ['python', '../../../tools/grit/grit.py'],
     24             'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd',
     25             'grit_rc_header_format%': '',
     26           },
     27           'inputs': [
     28             '<(grit_grd_file)',
     29             '<!@pymod_do_main(grit_info --inputs)',
     30           ],
     31           'outputs': [
     32             '<(grit_out_dir)/grit/devtools_resources.h',
     33             '<(grit_out_dir)/devtools_resources.pak',
     34             '<(grit_out_dir)/grit/devtools_resources_map.cc',
     35             '<(grit_out_dir)/grit/devtools_resources_map.h',
     36           ],
     37           'action': ['<@(grit_cmd)',
     38                      '-i', '<(grit_grd_file)', 'build',
     39                      '-f', '<(DEPTH)/tools/gritsettings/resource_ids',
     40                      '-o', '<(grit_out_dir)',
     41                      '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)',
     42                      '<@(grit_defines)',
     43                      '<@(grit_rc_header_format)'],
     44           'message': 'Generating resources from <(grit_grd_file)',
     45         },
     46         {
     47           'action_name': 'devtools_protocol_constants',
     48           'variables': {
     49             'blink_protocol': '../../../third_party/WebKit/Source/devtools/protocol.json',
     50             'browser_protocol': 'browser_protocol.json',
     51             'generator': '../../public/browser/devtools_protocol_constants_generator.py',
     52             'package': 'content'
     53           },
     54           'inputs': [
     55             '<(blink_protocol)',
     56             '<(browser_protocol)',
     57             '<(generator)',
     58           ],
     59           'outputs': [
     60             '<(SHARED_INTERMEDIATE_DIR)/<(package)/browser/devtools/devtools_protocol_constants.cc',
     61             '<(SHARED_INTERMEDIATE_DIR)/<(package)/browser/devtools/devtools_protocol_constants.h'
     62           ],
     63           'action':[
     64             'python',
     65             '<(generator)',
     66             '<(package)',
     67             '<(SHARED_INTERMEDIATE_DIR)/<(package)/browser/devtools/devtools_protocol_constants.cc',
     68             '<(SHARED_INTERMEDIATE_DIR)/<(package)/browser/devtools/devtools_protocol_constants.h',
     69             '<(blink_protocol)',
     70             '<(browser_protocol)',
     71           ],
     72           'message': 'Generating DevTools protocol constants from <(blink_protocol)'
     73         }
     74       ],
     75       'direct_dependent_settings': {
     76         'include_dirs': [
     77           '<(SHARED_INTERMEDIATE_DIR)',
     78         ]
     79       },
     80       'includes': [ '../../../build/grit_target.gypi' ],
     81     },
     82   ],
     83 }
     84