| OLD | NEW |
| (Empty) |
| 1 { | |
| 2 'includes': [ | |
| 3 '../../../../WebKit/chromium/features.gypi', | |
| 4 '../../../WebCore.gypi', | |
| 5 'overrides.gypi', | |
| 6 ], | |
| 7 'variables': { | |
| 8 'dart_dir': '../../../../../../../dart', | |
| 9 'dart_client_dir': '<(dart_dir)/client', | |
| 10 'dom_common_dir': '<(dart_client_dir)/dom/common', | |
| 11 'resources_dir': '../resources', | |
| 12 'scripts_dir': '../../scripts', | |
| 13 'webcore_dir': '../../..', | |
| 14 'webcore_gyp_dir': '<(webcore_dir)/WebCore.gyp', | |
| 15 | |
| 16 # FIXME: share with WebCore.gyp somehow. E.g. idls_list_temp_file is genera
ted really early, | |
| 17 # so we can massage it to adjust paths. | |
| 18 'bindings_idl_files': [ | |
| 19 '<@(webcore_bindings_idl_files)', | |
| 20 ], | |
| 21 | |
| 22 'bindings_idl_files!': [ | |
| 23 # Custom bindings in bindings/v8/custom exist for these. | |
| 24 '<(webcore_dir)/dom/EventListener.idl', | |
| 25 '<(webcore_dir)/dom/EventTarget.idl', | |
| 26 '<(webcore_dir)/html/VoidCallback.idl', | |
| 27 | |
| 28 # Bindings with custom Objective-C implementations. | |
| 29 '<(webcore_dir)/page/AbstractView.idl', | |
| 30 | |
| 31 # FIXME: eventually we should enable them, but not now. Those only inject | |
| 32 # constructors anyway, so we need a special treatment for them. | |
| 33 '<(webcore_dir)/webaudio/DOMWindowWebAudio.idl', | |
| 34 '<(webcore_dir)/websockets/DOMWindowWebSocket.idl', | |
| 35 '<(webcore_dir)/Modules/gamepad/NavigatorGamepad.idl', | |
| 36 | |
| 37 # These bindings are excluded, as they're only used through inheritance an
d don't define constants that would need a constructor. | |
| 38 '<(webcore_dir)/svg/ElementTimeControl.idl', | |
| 39 '<(webcore_dir)/svg/SVGExternalResourcesRequired.idl', | |
| 40 '<(webcore_dir)/svg/SVGFilterPrimitiveStandardAttributes.idl', | |
| 41 '<(webcore_dir)/svg/SVGFitToViewBox.idl', | |
| 42 | |
| 43 '<(webcore_dir)/svg/SVGLangSpace.idl', | |
| 44 '<(webcore_dir)/svg/SVGLocatable.idl', | |
| 45 '<(webcore_dir)/svg/SVGStylable.idl', | |
| 46 '<(webcore_dir)/svg/SVGTests.idl', | |
| 47 '<(webcore_dir)/svg/SVGTransformable.idl', | |
| 48 '<(webcore_dir)/svg/SVGViewSpec.idl', | |
| 49 '<(webcore_dir)/svg/SVGZoomAndPan.idl', | |
| 50 | |
| 51 # FIXME: I don't know why these are excluded, either. | |
| 52 # Someone (me?) should figure it out and add appropriate comments. | |
| 53 '<(webcore_dir)/css/CSSUnknownRule.idl', | |
| 54 ], | |
| 55 | |
| 56 'conditions': [ | |
| 57 # TODO(maruel): Move it in its own project or generate it anyway? | |
| 58 ['enable_svg!=0', { | |
| 59 'bindings_idl_files': [ | |
| 60 '<@(webcore_svg_bindings_idl_files)', | |
| 61 ], | |
| 62 }], | |
| 63 ], | |
| 64 }, | |
| 65 | |
| 66 'targets': [ | |
| 67 { | |
| 68 'target_name': 'dart_builtin_library_source', | |
| 69 'type': 'none', | |
| 70 'actions': [ | |
| 71 { | |
| 72 'action_name': 'generateDartBuiltinLibrarySource', | |
| 73 'inputs': [ | |
| 74 'scripts/generate-dart-library-source.pl', | |
| 75 '<(resources_dir)/builtin.dart', | |
| 76 ], | |
| 77 'outputs': [ | |
| 78 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/DartBuiltinLibrarySource
.h', | |
| 79 ], | |
| 80 'action': [ | |
| 81 'perl', | |
| 82 'scripts/generate-dart-library-source.pl', | |
| 83 'dartBuiltinLibrarySource', | |
| 84 '<@(_outputs)', | |
| 85 '<@(_inputs)' | |
| 86 ], | |
| 87 'message': 'Generating DartBuiltinLibrarySource.h', | |
| 88 }, | |
| 89 ] | |
| 90 }, | |
| 91 { | |
| 92 'target_name': 'dart_generated_lib_sources', | |
| 93 'type': 'none', | |
| 94 'dependencies': [ | |
| 95 'dart_builtin_library_source', | |
| 96 ], | |
| 97 }, | |
| 98 { | |
| 99 'target_name': 'dart_generated_sources', | |
| 100 'type': 'none', | |
| 101 'hard_dependency': 1, | |
| 102 'sources': [ | |
| 103 '<@(bindings_idl_files)', | |
| 104 ], | |
| 105 'actions': [ | |
| 106 { | |
| 107 'action_name': 'dart_derived_sources_all_in_one', | |
| 108 'variables': { | |
| 109 # Write sources into a file, so that the action command line won't | |
| 110 # exceed OS limites. | |
| 111 'idls_list_temp_file': '<|(idls_list_temp_file.tmp <@(bindings_idl_f
iles))', | |
| 112 }, | |
| 113 'inputs': [ | |
| 114 'scripts/dart_action_derivedsourcesallinone.py', | |
| 115 '<(idls_list_temp_file)', | |
| 116 '<@(bindings_idl_files)', | |
| 117 ], | |
| 118 'outputs': [ | |
| 119 '<@(additional_derived_sources_aggregate_files)', | |
| 120 ], | |
| 121 'action': [ | |
| 122 'python', | |
| 123 'scripts/dart_action_derivedsourcesallinone.py', | |
| 124 '<(idls_list_temp_file)', | |
| 125 '--', | |
| 126 '<@(additional_derived_sources_aggregate_files)', | |
| 127 ], | |
| 128 }, | |
| 129 { | |
| 130 'action_name': 'V8HTMLNames', | |
| 131 'inputs': [ | |
| 132 '<(webcore_dir)/dom/make_names.pl', | |
| 133 '<(webcore_dir)/html/HTMLTagNames.in', | |
| 134 '<(webcore_dir)/html/HTMLAttributeNames.in', | |
| 135 ], | |
| 136 'outputs': [ | |
| 137 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.cpp', | |
| 138 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLNames.h', | |
| 139 '<(SHARED_INTERMEDIATE_DIR)/webkit/HTMLElementFactory.cpp', | |
| 140 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp', | |
| 141 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h', | |
| 142 ], | |
| 143 'action': [ | |
| 144 'python', | |
| 145 '<(webcore_gyp_dir)/scripts/action_makenames.py', | |
| 146 '<@(_outputs)', | |
| 147 '--', | |
| 148 '<@(_inputs)', | |
| 149 '--', | |
| 150 '--factory', | |
| 151 '--wrapperFactoryV8', | |
| 152 '--extraDefines', '<(feature_defines)' | |
| 153 ], | |
| 154 }, | |
| 155 { | |
| 156 'action_name': 'V8SVGNames', | |
| 157 'inputs': [ | |
| 158 '<(webcore_dir)/dom/make_names.pl', | |
| 159 '<(webcore_dir)/svg/svgtags.in', | |
| 160 '<(webcore_dir)/svg/svgattrs.in', | |
| 161 ], | |
| 162 'outputs': [ | |
| 163 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.cpp', | |
| 164 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGNames.h', | |
| 165 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.cpp', | |
| 166 '<(SHARED_INTERMEDIATE_DIR)/webkit/SVGElementFactory.h', | |
| 167 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp', | |
| 168 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h', | |
| 169 ], | |
| 170 'action': [ | |
| 171 'python', | |
| 172 '<(webcore_gyp_dir)/scripts/action_makenames.py', | |
| 173 '<@(_outputs)', | |
| 174 '--', | |
| 175 '<@(_inputs)', | |
| 176 '--', | |
| 177 '--factory', | |
| 178 '--wrapperFactoryV8', | |
| 179 '--extraDefines', '<(feature_defines)' | |
| 180 ], | |
| 181 }, | |
| 182 { | |
| 183 'action_name': 'HTMLNames', | |
| 184 'inputs': [ | |
| 185 '<(webcore_dir)/dom/make_names.pl', | |
| 186 '<(webcore_dir)/html/HTMLTagNames.in', | |
| 187 '<(webcore_dir)/html/HTMLAttributeNames.in', | |
| 188 'scripts/massage_factories.py', | |
| 189 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.cpp', | |
| 190 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8HTMLElementWrapperFactory.h', | |
| 191 ], | |
| 192 'outputs': [ | |
| 193 '<(SHARED_INTERMEDIATE_DIR)/webkit/DartHTMLElementWrapperFactory.cpp
', | |
| 194 '<(SHARED_INTERMEDIATE_DIR)/webkit/DartHTMLElementWrapperFactory.h', | |
| 195 ], | |
| 196 'action': [ | |
| 197 'python', | |
| 198 'scripts/massage_factories.py', | |
| 199 '<(SHARED_INTERMEDIATE_DIR)/webkit', | |
| 200 'HTML' | |
| 201 ], | |
| 202 }, | |
| 203 { | |
| 204 'action_name': 'SVGNames', | |
| 205 'inputs': [ | |
| 206 '<(webcore_dir)/dom/make_names.pl', | |
| 207 '<(webcore_dir)/svg/svgtags.in', | |
| 208 '<(webcore_dir)/svg/svgattrs.in', | |
| 209 'scripts/massage_factories.py', | |
| 210 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.cpp', | |
| 211 '<(SHARED_INTERMEDIATE_DIR)/webkit/V8SVGElementWrapperFactory.h', | |
| 212 ], | |
| 213 'outputs': [ | |
| 214 '<(SHARED_INTERMEDIATE_DIR)/webkit/DartSVGElementWrapperFactory.cpp'
, | |
| 215 '<(SHARED_INTERMEDIATE_DIR)/webkit/DartSVGElementWrapperFactory.h', | |
| 216 ], | |
| 217 'action': [ | |
| 218 'python', | |
| 219 'scripts/massage_factories.py', | |
| 220 '<(SHARED_INTERMEDIATE_DIR)/webkit', | |
| 221 'SVG' | |
| 222 ], | |
| 223 }, | |
| 224 ], | |
| 225 'rules': [ | |
| 226 { | |
| 227 'rule_name': 'dart_binding', | |
| 228 'extension': 'idl', | |
| 229 'msvs_external_rule': 1, | |
| 230 'inputs': [ | |
| 231 '<(scripts_dir)/generate-bindings.pl', | |
| 232 '<(scripts_dir)/CodeGenerator.pm', | |
| 233 'scripts/CodeGeneratorDart.pm', | |
| 234 '<(scripts_dir)/IDLParser.pm', | |
| 235 '<(scripts_dir)/IDLStructure.pm', | |
| 236 '<(scripts_dir)/preprocessor.pm', | |
| 237 ], | |
| 238 'outputs': [ | |
| 239 # FIXME: The .cpp file should be in webkit/bindings once | |
| 240 # we coax GYP into supporting it (see 'action' below). | |
| 241 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/Dart<(RULE_INPUT_ROOT).
cpp', | |
| 242 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/Dart<(RULE_INPUT_ROOT).h
', | |
| 243 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/<(RULE_INPUT_ROOT).dart'
, | |
| 244 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/<(RULE_INPUT_ROOT)Implem
entation.dart', | |
| 245 ], | |
| 246 'variables': { | |
| 247 'generator_include_dirs': [ | |
| 248 '--include', '<(webcore_dir)/css', | |
| 249 '--include', '<(webcore_dir)/dom', | |
| 250 '--include', '<(webcore_dir)/fileapi', | |
| 251 '--include', '<(webcore_dir)/html', | |
| 252 '--include', '<(webcore_dir)/mediastream', | |
| 253 '--include', '<(webcore_dir)/notifications', | |
| 254 '--include', '<(webcore_dir)/page', | |
| 255 '--include', '<(webcore_dir)/plugins', | |
| 256 '--include', '<(webcore_dir)/storage', | |
| 257 '--include', '<(webcore_dir)/svg', | |
| 258 '--include', '<(webcore_dir)/testing', | |
| 259 '--include', '<(webcore_dir)/webaudio', | |
| 260 '--include', '<(webcore_dir)/websockets', | |
| 261 '--include', '<(webcore_dir)/workers', | |
| 262 '--include', '<(webcore_dir)/xml', | |
| 263 ], | |
| 264 }, | |
| 265 # FIXME: Note that we put the .cpp files in webcore/bindings | |
| 266 # but the .h files in webkit/bindings. This is to work around | |
| 267 # the unfortunate fact that GYP strips duplicate arguments | |
| 268 # from lists. When we have a better GYP way to suppress that | |
| 269 # behavior, change the output location. | |
| 270 'action': [ | |
| 271 'perl', | |
| 272 '-w', | |
| 273 '-I<(webcore_gyp_dir)/../bindings/scripts', | |
| 274 '-Iscripts', | |
| 275 '<(webcore_gyp_dir)/../bindings/scripts/generate-bindings.pl', | |
| 276 '--outputHeadersDir', | |
| 277 '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings', | |
| 278 '--outputDir', | |
| 279 '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings', | |
| 280 '--defines', | |
| 281 '<(feature_defines) LANGUAGE_JAVASCRIPT LANGUAGE_DART', | |
| 282 '--generator', | |
| 283 'Dart', | |
| 284 '<@(generator_include_dirs)', | |
| 285 '<(RULE_INPUT_PATH)', | |
| 286 ], | |
| 287 'message': 'Generating Dart binding from <(RULE_INPUT_PATH)', | |
| 288 }, | |
| 289 ], | |
| 290 }, | |
| 291 { | |
| 292 'target_name': 'dart_snapshot', | |
| 293 'type': 'none', | |
| 294 'hard_dependency': 1, | |
| 295 'dependencies': [ | |
| 296 'dart_generated_sources', | |
| 297 '<(dart_dir)/runtime/dart-runtime.gyp:gen_snapshot', | |
| 298 ], | |
| 299 'variables': { | |
| 300 'idls_list_temp_file': '<|(idls_list_temp_file.tmp <@(bindings_idl_files
))', | |
| 301 }, | |
| 302 'sources': [ | |
| 303 # '<!@(cat <(idls_list_temp_file))', | |
| 304 ], | |
| 305 'actions': [ | |
| 306 { | |
| 307 'action_name': 'build_dart_snapshot', | |
| 308 'variables': { | |
| 309 'output_path': '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings', | |
| 310 }, | |
| 311 'inputs': [ | |
| 312 'scripts/build_dart_snapshot.py', | |
| 313 '<(idls_list_temp_file)', | |
| 314 '<@(bindings_idl_files)', | |
| 315 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX)
', | |
| 316 '<(resources_dir)/dom_public.dart', | |
| 317 '<(resources_dir)/dom_implementation.dart', | |
| 318 ], | |
| 319 'outputs': [ | |
| 320 '<(output_path)/DartSnapshot.bytes', | |
| 321 '<(output_path)/DartResolver.cpp', | |
| 322 ], | |
| 323 'action': [ | |
| 324 'python', | |
| 325 'scripts/build_dart_snapshot.py', | |
| 326 '<(idls_list_temp_file)', | |
| 327 '<(dart_dir)', | |
| 328 '<(resources_dir)', | |
| 329 '<(output_path)', | |
| 330 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX)
', | |
| 331 '<(feature_defines)', | |
| 332 ], | |
| 333 }, | |
| 334 ], | |
| 335 }, | |
| 336 ], | |
| 337 } | |
| OLD | NEW |