Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / content / browser / devtools / devtools_resources.gyp
blobbd35d426b259dc33464522c4921259520a004766
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.
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)/blink',
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%': '',
27             'conditions': [
28               # These scripts can skip writing generated files if they are
29               # identical to the already existing files, which avoids further
30               # build steps, like recompilation. However, a dependency (earlier
31               # build step) having a newer timestamp than an output (later
32               # build step) confuses some build systems, so only use this on
33               # ninja, which explicitly supports this use case (gyp turns all
34               # actions into ninja restat rules).
35               ['"<(GENERATOR)"=="ninja"', {
36                 'write_only_new': '1',
37               }, {
38                 'write_only_new': '0',
39               }],
40             ],
41           },
42           'inputs': [
43             '<(grit_grd_file)',
44             '<!@pymod_do_main(grit_info --inputs)',
45           ],
46           'outputs': [
47             '<(grit_out_dir)/grit/devtools_resources.h',
48             '<(grit_out_dir)/devtools_resources.pak',
49             '<(grit_out_dir)/grit/devtools_resources_map.cc',
50             '<(grit_out_dir)/grit/devtools_resources_map.h',
51           ],
52           'action': ['<@(grit_cmd)',
53                      '-i', '<(grit_grd_file)', 'build',
54                      '-f', '<(DEPTH)/tools/gritsettings/resource_ids',
55                      '-o', '<(grit_out_dir)',
56                      '--write-only-new=<(write_only_new)',
57                      '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)',
58                      '<@(grit_defines)',
59                      '<@(grit_rc_header_format)'],
60           'message': 'Generating resources from <(grit_grd_file)',
61         },
62       ],
63       'direct_dependent_settings': {
64         'include_dirs': [
65           '<(SHARED_INTERMEDIATE_DIR)',
66         ]
67       },
68       'includes': [ '../../../build/grit_target.gypi' ],
69     },
70   ],