Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(690)

Unified Diff: Source/bindings/derived_sources.gyp

Issue 18190004: Add Python flow to bindings generation, move dummy-generating IDL files over (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/scripts/CodeGeneratorV8.pm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/derived_sources.gyp
diff --git a/Source/bindings/derived_sources.gyp b/Source/bindings/derived_sources.gyp
index 35d44d8ec3d83c44824fcbeb6846465ce99d549f..aed9de3bd068d281896f493fd74668f18b9aa5f6 100644
--- a/Source/bindings/derived_sources.gyp
+++ b/Source/bindings/derived_sources.gyp
@@ -31,18 +31,28 @@
{
'includes': [
'../WebKit/chromium/WinPrecompile.gypi',
- '../core/features.gypi',
'../core/core.gypi',
'../modules/modules.gypi',
'bindings.gypi',
],
'variables': {
- 'idl_files': [
- '<@(core_idl_files)',
- '<@(modules_idl_files)',
- '<@(svg_idl_files)',
+ 'deprecated_perl_idl_files': [
+ '<@(deprecated_perl_core_idl_files)',
+ '<@(deprecated_perl_modules_idl_files)',
+ '<@(deprecated_perl_svg_idl_files)',
],
+ 'python_idl_files': [
+ '<@(python_core_idl_files)',
+ '<@(python_modules_idl_files)',
+ '<@(python_svg_idl_files)',
+ ],
+ 'perl_and_python_idl_files': [
+ '<@(deprecated_perl_idl_files)',
+ '<@(python_idl_files)',
+ ],
+
+ 'bindings_output_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
'generated_global_constructors_idl_files': [
'<(SHARED_INTERMEDIATE_DIR)/WindowConstructors.idl',
'<(SHARED_INTERMEDIATE_DIR)/WorkerGlobalScopeConstructors.idl',
@@ -54,29 +64,29 @@
['OS=="win" and buildtype=="Official"', {
# On windows official release builds, we try to preserve symbol space.
'derived_sources_aggregate_files': [
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSourcesAll.cpp',
+ '<(bindings_output_dir)/V8DerivedSourcesAll.cpp',
],
},{
'derived_sources_aggregate_files': [
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources01.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources02.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources03.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources04.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources05.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources06.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources07.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources08.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources09.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources10.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources11.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources12.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources13.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources14.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources15.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources16.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources17.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources18.cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8DerivedSources19.cpp',
+ '<(bindings_output_dir)/V8DerivedSources01.cpp',
+ '<(bindings_output_dir)/V8DerivedSources02.cpp',
+ '<(bindings_output_dir)/V8DerivedSources03.cpp',
+ '<(bindings_output_dir)/V8DerivedSources04.cpp',
+ '<(bindings_output_dir)/V8DerivedSources05.cpp',
+ '<(bindings_output_dir)/V8DerivedSources06.cpp',
+ '<(bindings_output_dir)/V8DerivedSources07.cpp',
+ '<(bindings_output_dir)/V8DerivedSources08.cpp',
+ '<(bindings_output_dir)/V8DerivedSources09.cpp',
+ '<(bindings_output_dir)/V8DerivedSources10.cpp',
+ '<(bindings_output_dir)/V8DerivedSources11.cpp',
+ '<(bindings_output_dir)/V8DerivedSources12.cpp',
+ '<(bindings_output_dir)/V8DerivedSources13.cpp',
+ '<(bindings_output_dir)/V8DerivedSources14.cpp',
+ '<(bindings_output_dir)/V8DerivedSources15.cpp',
+ '<(bindings_output_dir)/V8DerivedSources16.cpp',
+ '<(bindings_output_dir)/V8DerivedSources17.cpp',
+ '<(bindings_output_dir)/V8DerivedSources18.cpp',
+ '<(bindings_output_dir)/V8DerivedSources19.cpp',
],
}],
# The bindings generator can not write generated files if they are identical
@@ -107,7 +117,7 @@
'variables': {
# Write sources into a file, so that the action command line won't
# exceed OS limits.
- 'idl_files_list': '<|(idl_files_list.tmp <@(idl_files))',
+ 'idl_files_list': '<|(idl_files_list.tmp <@(perl_and_python_idl_files))',
},
'inputs': [
'scripts/compute_dependencies.py',
@@ -143,7 +153,7 @@
}]
},
{
- 'target_name': 'bindings_sources',
+ 'target_name': 'deprecated_perl_bindings_sources',
'type': 'none',
# The 'binding' rule generates .h files, so mark as hard_dependency, per:
# https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependencies
@@ -153,18 +163,18 @@
'../core/core_derived_sources.gyp:generate_test_support_idls',
],
'sources': [
- '<@(idl_files)',
- '<@(webcore_test_support_idl_files)',
+ '<@(deprecated_perl_idl_files)',
+ '<@(deprecated_perl_webcore_test_support_idl_files)',
],
'rules': [{
- 'rule_name': 'binding',
+ 'rule_name': 'deprecated_perl_binding',
'extension': 'idl',
'msvs_external_rule': 1,
'inputs': [
- 'scripts/generate-bindings.pl',
- 'scripts/CodeGeneratorV8.pm',
- 'scripts/IDLParser.pm',
- 'scripts/IDLSerializer.pm',
+ 'scripts/deprecated_generate_bindings.pl',
+ 'scripts/deprecated_code_generator_v8.pm',
+ 'scripts/deprecated_idl_parser.pm',
+ 'scripts/deprecated_idl_serializer.pm',
'../core/scripts/preprocessor.pm',
'scripts/IDLAttributes.txt',
# FIXME: If the dependency structure changes, we rebuild all files,
@@ -176,21 +186,21 @@
#
# If a new partial interface is added, need to regyp to update these
# dependencies, as these are computed statically at gyp runtime.
- '<!@pymod_do_main(list_idl_files_with_partial_interface <@(idl_files))',
+ '<!@pymod_do_main(list_idl_files_with_partial_interface <@(perl_and_python_idl_files))',
# Generated IDLs are all partial interfaces, hence everything
# potentially depends on them.
'<@(generated_global_constructors_idl_files)',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).cpp',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8<(RULE_INPUT_ROOT).h',
+ '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp',
+ '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h',
],
'variables': {
# IDL include paths. The generator will search recursively for IDL
# files under these locations.
'generator_include_dirs': [
- '--include', '../modules',
'--include', '../core',
+ '--include', '../modules',
'--include', '<(SHARED_INTERMEDIATE_DIR)/webkit',
],
# Hook for embedders to specify extra directories to find IDL files.
@@ -206,19 +216,17 @@
'-Iscripts',
'-I../core/scripts',
'-I../../../JSON/out/lib/perl5',
- 'scripts/generate-bindings.pl',
+ 'scripts/deprecated_generate_bindings.pl',
'--outputDir',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
+ '<(bindings_output_dir)',
'--idlAttributesFile',
'scripts/IDLAttributes.txt',
- '--defines',
- '<(feature_defines)',
'<@(generator_include_dirs)',
'<@(extra_blink_generator_include_dirs)',
'--interfaceDependenciesFile',
'<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
'--additionalIdlFiles',
- '<(webcore_test_support_idl_files)',
+ '<(deprecated_perl_webcore_test_support_idl_files)',
'<@(preprocessor)',
'<@(write_file_only_if_changed)',
'<(RULE_INPUT_PATH)',
@@ -227,11 +235,85 @@
}],
},
{
+ 'target_name': 'python_bindings_sources',
+ 'type': 'none',
+ # The 'binding' rule generates .h files, so mark as hard_dependency, per:
+ # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependencies
+ 'hard_dependency': 1,
+ 'dependencies': [
+ 'interface_dependencies',
+ '../core/core_derived_sources.gyp:generate_test_support_idls',
+ ],
+ 'sources': [
+ '<@(python_idl_files)',
+ '<@(python_webcore_test_support_idl_files)',
+ ],
+ 'rules': [{
+ 'rule_name': 'python_binding',
+ 'extension': 'idl',
+ 'msvs_external_rule': 1,
+ 'inputs': [
+ 'scripts/idl_compiler.py',
+ 'scripts/idl_reader.py',
+ 'scripts/interface_dependency_resolver.py',
+ 'scripts/code_generator_v8.py',
+ 'scripts/IDLAttributes.txt',
+ # FIXME: If the dependency structure changes, we rebuild all files,
+ # since we're not computing dependencies file-by-file in the build.
+ '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
+ # FIXME: Similarly, if any partial interface changes, rebuild
+ # everything, since every IDL potentially depends on them, because
+ # we're not computing dependencies file-by-file.
+ '<!@pymod_do_main(list_idl_files_with_partial_interface <@(perl_and_python_idl_files))',
+ # Generated IDLs are all partial interfaces, hence everything
+ # potentially depends on them.
+ '<@(generated_global_constructors_idl_files)',
+ ],
+ 'outputs': [
+ '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).cpp',
+ '<(bindings_output_dir)/V8<(RULE_INPUT_ROOT).h',
+ ],
+ 'variables': {
+ # IDL include paths. The generator will search recursively for IDL
+ # files under these locations.
+ 'generator_include_dirs': [
+ '--include', '../core',
+ '--include', '../modules',
+ '--include', '<(SHARED_INTERMEDIATE_DIR)/webkit',
+ ],
+ # Hook for embedders to specify extra directories to find IDL files.
+ 'extra_blink_generator_include_dirs%': [],
+ },
+ 'msvs_cygwin_shell': 0,
+ # sanitize-win-build-log.sed uses a regex which matches this command
+ # line (Python script + .idl file being processed).
+ # Update that regex if command line changes (other than changing flags)
+ 'action': [
+ 'python',
+ 'scripts/idl_compiler.py',
+ '--output-dir',
+ '<(bindings_output_dir)',
+ '--idl-attributes-file',
+ 'scripts/IDLAttributes.txt',
+ '<@(generator_include_dirs)',
+ '<@(extra_blink_generator_include_dirs)',
+ '--interface-dependencies-file',
+ '<(SHARED_INTERMEDIATE_DIR)/InterfaceDependencies.txt',
+ '--additional-idl-files',
+ '<(python_webcore_test_support_idl_files)',
+ '<@(write_file_only_if_changed)',
+ '<(RULE_INPUT_PATH)',
+ ],
+ 'message': 'Generating binding from <(RULE_INPUT_PATH)',
+ }],
+ },
+ {
'target_name': 'bindings_derived_sources',
'type': 'none',
'dependencies': [
'interface_dependencies',
- 'bindings_sources',
+ 'deprecated_perl_bindings_sources',
+ 'python_bindings_sources',
],
'actions': [{
'action_name': 'derived_sources_all_in_one',
« no previous file with comments | « no previous file | Source/bindings/scripts/CodeGeneratorV8.pm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698