• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2013 Google Inc. All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8#     * Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10#     * Redistributions in binary form must reproduce the above
11# copyright notice, this list of conditions and the following disclaimer
12# in the documentation and/or other materials provided with the
13# distribution.
14#     * Neither the name of Google Inc. nor the names of its
15# contributors may be used to endorse or promote products derived from
16# this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29#
30{
31  'includes': [
32    '../build/scripts/scripts.gypi',
33    '../build/win/precompile.gypi',
34    '../bindings/modules/modules.gypi',  # modules can depend on bindings/modules, but not on bindings
35    'modules.gypi',
36  ],
37  'targets': [{
38    # GN version: //third_party/WebKit/Source/modules:modules
39    'target_name': 'modules',
40    'type': 'static_library',
41    'dependencies': [
42      '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
43      '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
44      '../config.gyp:config',
45      '../core/core.gyp:webcore',
46      'make_modules_generated',
47    ],
48    'defines': [
49      'BLINK_IMPLEMENTATION=1',
50      'INSIDE_BLINK',
51    ],
52    'include_dirs': [
53      # FIXME: Remove these once scripts generate qualified
54      # includes correctly: http://crbug.com/380054
55      '<(blink_core_output_dir)',
56      '<(blink_modules_output_dir)',
57    ],
58    'sources': [
59      '<@(modules_files)',
60      '<@(bindings_modules_v8_generated_aggregate_files)',
61    ],
62    'actions': [
63      {
64        # GN version: //third_party/WebKit/Source/modules:modules_fetch_polyfill
65        'action_name': 'FetchPolyfill',
66        'process_outputs_as_sources': 1,
67        'variables': {
68            'resources': [
69                 'serviceworkers/polyfills/fetchPolyfill.js',
70            ],
71        },
72        'inputs': [
73            '../build/scripts/make-file-arrays.py',
74            '<@(resources)',
75        ],
76        'outputs': [
77            '<(SHARED_INTERMEDIATE_DIR)/blink/FetchPolyfill.h',
78            '<(SHARED_INTERMEDIATE_DIR)/blink/FetchPolyfill.cpp',
79        ],
80        'action': [
81            'python',
82            '../build/scripts/make-file-arrays.py',
83            '--out-h=<(SHARED_INTERMEDIATE_DIR)/blink/FetchPolyfill.h',
84            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/blink/FetchPolyfill.cpp',
85            '--namespace=WebCore',
86            '<@(resources)',
87        ],
88      },
89      {
90        # GN version: //third_party/WebKit/Source/modules:modules_cache_polyfill
91        'action_name': 'CachePolyfill',
92        'process_outputs_as_sources': 1,
93        'variables': {
94            'resources': [
95                 'serviceworkers/polyfills/cachePolyfill.js',
96            ],
97        },
98        'inputs': [
99            '../build/scripts/make-file-arrays.py',
100            '<@(resources)',
101        ],
102        'outputs': [
103            '<(SHARED_INTERMEDIATE_DIR)/blink/CachePolyfill.h',
104            '<(SHARED_INTERMEDIATE_DIR)/blink/CachePolyfill.cpp',
105        ],
106        'action': [
107            'python',
108            '../build/scripts/make-file-arrays.py',
109            '--out-h=<(SHARED_INTERMEDIATE_DIR)/blink/CachePolyfill.h',
110            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/blink/CachePolyfill.cpp',
111            '--namespace=WebCore',
112            '<@(resources)',
113        ],
114      },
115      {
116        # GN version: //third_party/WebKit/Source/modules:modules_cache_storage_polyfill
117        'action_name': 'CacheStoragePolyfill',
118        'process_outputs_as_sources': 1,
119        'variables': {
120            'resources': [
121                 'serviceworkers/polyfills/cacheStoragePolyfill.js',
122            ],
123        },
124        'inputs': [
125            '../build/scripts/make-file-arrays.py',
126            '<@(resources)',
127        ],
128        'outputs': [
129            '<(SHARED_INTERMEDIATE_DIR)/blink/CacheStoragePolyfill.h',
130            '<(SHARED_INTERMEDIATE_DIR)/blink/CacheStoragePolyfill.cpp',
131        ],
132        'action': [
133            'python',
134            '../build/scripts/make-file-arrays.py',
135            '--out-h=<(SHARED_INTERMEDIATE_DIR)/blink/CacheStoragePolyfill.h',
136            '--out-cpp=<(SHARED_INTERMEDIATE_DIR)/blink/CacheStoragePolyfill.cpp',
137            '--namespace=WebCore',
138            '<@(resources)',
139        ],
140      },
141    ],
142    # Disable c4267 warnings until we fix size_t to int truncations.
143    'msvs_disabled_warnings': [ 4267, 4334, ]
144  },
145  {
146    # GN version: //third_party/WebKit/Source/modules:modules_testing
147    'target_name': 'modules_testing',
148    'type': 'static_library',
149    'dependencies': [
150      '../config.gyp:config',
151      '../core/core.gyp:webcore',
152    ],
153    'defines': [
154      'BLINK_IMPLEMENTATION=1',
155      'INSIDE_BLINK',
156    ],
157    'sources': [
158      '<@(modules_testing_files)',
159    ],
160
161  },
162  {
163    # FIXME: should be in modules_generated.gyp
164    # GN version: //third_party/WebKit/Source/modules:make_modules_generated
165    'target_name': 'make_modules_generated',
166    'type': 'none',
167    'hard_dependency': 1,
168    'dependencies': [
169      #'generated_testing_idls',
170      '../core/core_generated.gyp:core_event_interfaces',
171      '../bindings/modules/generated.gyp:modules_event_generated',
172      '../config.gyp:config',
173    ],
174    'sources': [
175      # bison rule
176      '../core/css/CSSGrammar.y',
177      '../core/xml/XPathGrammar.y',
178    ],
179    'actions': [
180    ],
181  }],
182}
183