summaryrefslogtreecommitdiffstats
path: root/ceee/ie/plugin/scripting/scripting.gyp
blob: d7593e71a2e201d1e333d22924cdbc02bdf23de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'variables': {
    'chromium_code': 1,
  },
  'includes': [
    '../../../../build/common.gypi',
    '../../../../ceee/common.gypi',
  ],
  'targets': [
    {
      'target_name': 'scripting',
      'type': 'static_library',
      'dependencies': [
        'javascript_bindings',
        '../../common/common.gyp:ie_common',
        '../../common/common.gyp:ie_common_settings',
        '../toolband/toolband.gyp:toolband_idl',
        '../../../../base/base.gyp:base',
        '../../../../ceee/common/common.gyp:ceee_common',
      ],
      'sources': [
        'base.js',
        'ceee_bootstrap.js',
        'json.js',
        'content_script_manager.cc',
        'content_script_manager.h',
        'content_script_manager.rc',
        'content_script_native_api.cc',
        'content_script_native_api.h',
        '../../common/precompile.cc',
        '../../common/precompile.h',
        'script_host.cc',
        'script_host.h',
        'userscripts_librarian.cc',
        'userscripts_librarian.h',
        'userscripts_docs.h',
      ],
      'configurations': {
        'Debug': {
          'msvs_precompiled_source': '../../common/precompile.cc',
          'msvs_precompiled_header': '../../common/precompile.h',
        },
      },
    },
    {
      'target_name': 'javascript_bindings',
      'type': 'none',
      'variables': {
        'chrome_renderer_path' : '../../../../chrome/renderer',
        'input_js_files': [
          '<(chrome_renderer_path)/resources/event_bindings.js',
          '<(chrome_renderer_path)/resources/renderer_extension_bindings.js',
        ],
        'output_js_files': [
          '<(SHARED_INTERMEDIATE_DIR)/event_bindings.js',
          '<(SHARED_INTERMEDIATE_DIR)/renderer_extension_bindings.js',
        ],
      },
      'sources': [
        'transform_native_js.py',
        '<@(input_js_files)',
      ],
      'actions': [
        {
          'action_name': 'transform_native_js',
          'msvs_cygwin_shell': 0,
          'msvs_quote_cmd': 0,
          'inputs': [
            '<@(_sources)',
          ],
          'outputs': [
            '<@(output_js_files)',
          ],
          'action': [
            '<@(python)',
            'transform_native_js.py',
            '<@(input_js_files)',
            '-o',
            '<(SHARED_INTERMEDIATE_DIR)',
          ],
        },
      ],
      # Make sure our dependents can refer to the transformed
      # files from their .rc file(s).
      'direct_dependent_settings': {
        'resource_include_dirs': ['<(SHARED_INTERMEDIATE_DIR)'],
      },
    },
  ]
}