Changeset 106913 in webkit
- Timestamp:
- Feb 7, 2012 12:54:04 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106912 r106913 1 2012-02-07 Kentaro Hara <haraken@chromium.org> 2 3 Unreviewed, rolling out r106862. 4 http://trac.webkit.org/changeset/106862 5 https://bugs.webkit.org/show_bug.cgi?id=77510 6 7 Mac build fails if we manually remove generated code 8 9 * DerivedSources.make: 10 * bindings/scripts/generate-bindings.pl: 11 (generateEmptyHeaderAndCpp): 12 * bindings/scripts/resolve-supplemental.pl: 13 * bindings/scripts/update-idl-needs-rebuild.pl: Removed. 14 1 15 2012-02-07 Kaustubh Atrawalkar <kaustubh@motorola.com> 2 16 -
trunk/Source/WebCore/DerivedSources.make
r106862 r106913 585 585 586 586 JS_DOM_HEADERS=$(filter-out JSMediaQueryListListener.h JSEventListener.h JSEventTarget.h, $(DOM_CLASSES:%=JS%.h)) 587 JS_IDL_NEEDS_REBUILDS=$(JS_DOM_HEADERS:JS%.h=%.idl-needs-rebuild) JavaScriptCallFrame.idl-needs-rebuild588 587 589 588 WEB_DOM_HEADERS := 590 589 ifeq ($(findstring BUILDING_WX,$(FEATURE_DEFINES)), BUILDING_WX) 591 590 WEB_DOM_HEADERS := $(filter-out WebDOMXSLTProcessor.h WebDOMEventTarget.h, $(DOM_CLASSES:%=WebDOM%.h)) 592 CPP_IDL_NEEDS_REBUILDS=$(WEB_DOM_HEADERS:WebDOM%.h=%.idl-needs-rebuild)593 591 endif # BUILDING_WX 594 592 595 593 all : \ 596 594 $(JS_DOM_HEADERS) \ 597 $(JS_IDL_NEEDS_REBUILDS) \598 \599 595 $(WEB_DOM_HEADERS) \ 600 $(CPP_IDL_NEEDS_REBUILDS) \601 596 \ 602 597 JSJavaScriptCallFrame.h \ … … 918 913 JS_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorJS.pm 919 914 920 SUPPLEMENTAL_DEPENDENCY_FILE = ./supplemental .dep915 SUPPLEMENTAL_DEPENDENCY_FILE = ./supplemental_dependency.tmp 921 916 IDL_FILES_TMP = ./idl_files.tmp 917 ADDITIONAL_IDLS = $(WebCore)/inspector/JavaScriptCallFrame.idl 922 918 923 919 # The following two lines get a space character stored in a variable. … … 926 922 space += 927 923 928 $(SUPPLEMENTAL_DEPENDENCY_FILE) : $(RESOLVE_SUPPLEMENTAL_SCRIPTS) $(BINDING_IDLS) $( WebCore)/inspector/JavaScriptCallFrame.idl929 printf "$(subst $(space),,$(patsubst %,%\n,$(BINDING_IDLS) $( WebCore)/inspector/JavaScriptCallFrame.idl))" > $(IDL_FILES_TMP)930 $(call resolve_supplemental_script, $(RESOLVE_SUPPLEMENTAL_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@ --newBuildFlow924 $(SUPPLEMENTAL_DEPENDENCY_FILE) : $(RESOLVE_SUPPLEMENTAL_SCRIPTS) $(BINDING_IDLS) $(ADDITIONAL_IDLS) 925 printf "$(subst $(space),,$(patsubst %,%\n,$(BINDING_IDLS) $(ADDITIONAL_IDLS)))" > $(IDL_FILES_TMP) 926 $(call resolve_supplemental_script, $(RESOLVE_SUPPLEMENTAL_SCRIPTS)) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@ 931 927 rm -f $(IDL_FILES_TMP) 932 928 933 %.idl-needs-rebuild : %.idl $(SUPPLEMENTAL_DEPENDENCY_FILE) $(WebCore)/bindings/scripts/update-idl-needs-rebuild.pl 934 perl $(WebCore)/bindings/scripts/update-idl-needs-rebuild.pl --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlFile $< 935 936 JS%.h : %.idl-needs-rebuild $(JS_BINDINGS_SCRIPTS) 937 $(call generator_script, $(JS_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlNeedsRebuildFile $< --newBuildFlow 929 JS%.h : %.idl $(JS_BINDINGS_SCRIPTS) $(SUPPLEMENTAL_DEPENDENCY_FILE) 930 $(call generator_script, $(JS_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $< 931 938 932 939 933 # Inspector interfaces generator … … 961 955 CPP_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorCPP.pm 962 956 963 WebDOM%.h : %.idl -needs-rebuild $(CPP_BINDINGS_SCRIPTS)964 $(call generator_script, $(CPP_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_CPP" --generator CPP --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlNeedsRebuildFile $< --newBuildFlow957 WebDOM%.h : %.idl $(CPP_BINDINGS_SCRIPTS) $(SUPPLEMENTAL_DEPENDENCY_FILE) 958 $(call generator_script, $(CPP_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_CPP" --generator CPP --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $< 965 959 endif # BUILDING_WX 966 960 … … 972 966 973 967 OBJC_DOM_HEADERS=$(filter-out DOMDOMWindow.h DOMDOMMimeType.h DOMDOMPlugin.h,$(DOM_CLASSES:%=DOM%.h)) 974 OBJC_IDL_NEEDS_REBUILDS=$(OBJC_DOM_HEADERS:DOM%.h=%.idl-needs-rebuild) 975 976 all : $(OBJC_DOM_HEADERS) $(OBJC_IDL_NEEDS_REBUILDS) 968 969 all : $(OBJC_DOM_HEADERS) 977 970 978 971 all : CharsetData.cpp … … 1005 998 1006 999 DOM_BINDINGS_SCRIPTS = $(GENERATE_BINDING_SCRIPTS) bindings/scripts/CodeGeneratorObjC.pm 1007 DOM%.h : %.idl -needs-rebuild $(DOM_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h1008 $(call generator_script, $(DOM_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) --idlNeedsRebuildFile $< --newBuildFlow1000 DOM%.h : %.idl $(DOM_BINDINGS_SCRIPTS) $(SUPPLEMENTAL_DEPENDENCY_FILE) bindings/objc/PublicDOMInterfaces.h 1001 $(call generator_script, $(DOM_BINDINGS_SCRIPTS)) $(IDL_COMMON_ARGS) --defines "$(FEATURE_DEFINES) $(ADDITIONAL_IDL_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $< 1009 1002 1010 1003 -include $(OBJC_DOM_HEADERS:.h=.dep) -
trunk/Source/WebCore/bindings/scripts/generate-bindings.pl
r106862 r106913 51 51 my $supplementalDependencyFile; 52 52 my $additionalIdlFilesList; 53 my $idlNeedsRebuildFile;54 my $newBuildFlow;55 53 56 54 GetOptions('include=s@' => \@idlDirectories, … … 65 63 'write-dependencies' => \$writeDependencies, 66 64 'supplementalDependencyFile=s' => \$supplementalDependencyFile, 67 'additionalIdlFilesList=s' => \$additionalIdlFilesList, 68 'idlNeedsRebuildFile=s' => \$idlNeedsRebuildFile, 69 # FIXME: After supporting the new build flow in all build systems (bug 76970), 70 # we should remove the --newBuildFlow option. 71 'newBuildFlow' => \$newBuildFlow); 65 'additionalIdlFilesList=s' => \$additionalIdlFilesList); 72 66 73 67 my $targetIdlFile = $ARGV[0]; 74 68 75 if ($idlNeedsRebuildFile) {76 open FH, "<", $idlNeedsRebuildFile or die "Couldn't open $idlNeedsRebuildFile: $!";77 while (<FH>) {78 chomp;79 if (/^IDLFile=(.*)$/) {80 $targetIdlFile = $1;81 last;82 }83 }84 close FH;85 }86 87 69 die('Must specify input file.') unless defined($targetIdlFile); 88 die('Must specify generator .') unless defined($generator);70 die('Must specify generator') unless defined($generator); 89 71 die('Must specify output directory.') unless defined($outputDirectory); 90 72 … … 101 83 my @supplementedIdlFiles; 102 84 if ($supplementalDependencyFile) { 103 # FIXME: After supporting the new build flow in all build systems (bug 76970), 104 # we should remove this if statement. 105 if ($newBuildFlow) { 106 # The format of a supplemental dependency file: 107 # 108 # DOMWindow.idl(1000) P.idl(800) Q.idl(1200) R.idl(1000) 109 # Document.idl(1000) S.idl(800) 110 # Event.idl(1200) 111 # ... 112 # 113 # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, 114 # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. 115 # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. 116 # The number in () is the last access timestamp of the file. 117 open FH, "<", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n"; 118 while (my $line = <FH>) { 119 my ($idlFileEntry, @supplementalIdlFileEntries) = split(/\s+/, $line); 120 die "The format of supplemental.dep is wrong\n" unless $idlFileEntry =~ /^([^\(]*)\(\d+\)$/; 121 my $idlFile = $1; 122 if (basename($idlFile) eq basename($targetIdlFile)) { 123 $idlFound = 1; 124 for my $supplementalIdlFileEntry (@supplementalIdlFileEntries) { 125 die "The format of supplemental.dep is wrong\n" unless $supplementalIdlFileEntry =~ /^([^\(]*)\(\d+\)$/; 126 push @supplementedIdlFiles, $1; 127 } 128 } 85 # The format of a supplemental dependency file: 86 # 87 # DOMWindow.idl P.idl Q.idl R.idl 88 # Document.idl S.idl 89 # Event.idl 90 # ... 91 # 92 # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, 93 # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. 94 # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. 95 open FH, "< $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n"; 96 while (my $line = <FH>) { 97 my ($idlFile, @followingIdlFiles) = split(/\s+/, $line); 98 if ($idlFile and basename($idlFile) eq basename($targetIdlFile)) { 99 $idlFound = 1; 100 @supplementedIdlFiles = @followingIdlFiles; 129 101 } 130 close FH; 131 } else { 132 # The format of a supplemental dependency file: 133 # 134 # DOMWindow.idl P.idl Q.idl R.idl 135 # Document.idl S.idl 136 # Event.idl 137 # ... 138 # 139 # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, 140 # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. 141 # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. 142 open FH, "<", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n"; 143 while (my $line = <FH>) { 144 my ($idlFile, @followingIdlFiles) = split(/\s+/, $line); 145 if ($idlFile and basename($idlFile) eq basename($targetIdlFile)) { 146 $idlFound = 1; 147 @supplementedIdlFiles = @followingIdlFiles; 148 } 149 } 150 close FH; 151 } 102 } 103 close FH; 152 104 153 105 # The file $additionalIdlFilesList contains one IDL file per line: … … 159 111 # but should generate .h and .cpp files. 160 112 if (!$idlFound and $additionalIdlFilesList) { 161 open FH, "< ", $additionalIdlFilesListor die "Cannot open $additionalIdlFilesList\n";113 open FH, "< $additionalIdlFilesList" or die "Cannot open $additionalIdlFilesList\n"; 162 114 my @idlFiles = <FH>; 163 115 chomp(@idlFiles); … … 256 208 */ 257 209 "; 258 open FH, "> ", "${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n";210 open FH, "> ${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n"; 259 211 print FH $contents; 260 212 close FH; 261 213 262 open FH, "> ", "${outputDirectory}/${cppName}" or die "Cannot open $cppName\n";214 open FH, "> ${outputDirectory}/${cppName}" or die "Cannot open $cppName\n"; 263 215 print FH $contents; 264 216 close FH; -
trunk/Source/WebCore/bindings/scripts/resolve-supplemental.pl
r106862 r106913 32 32 my $idlFilesList; 33 33 my $supplementalDependencyFile; 34 my $newBuildFlow;35 34 36 35 GetOptions('defines=s' => \$defines, … … 38 37 'verbose' => \$verbose, 39 38 'idlFilesList=s' => \$idlFilesList, 40 'supplementalDependencyFile=s' => \$supplementalDependencyFile, 41 # FIXME: After supporting the new build flow in all build systems (bug 76970), 42 # we should remove the --newBuildFlow option. 43 'newBuildFlow' => \$newBuildFlow); 39 'supplementalDependencyFile=s' => \$supplementalDependencyFile); 44 40 45 41 die('Must specify #define macros using --defines.') unless defined($defines); … … 51 47 } 52 48 53 open FH, "< ", $idlFilesListor die "Cannot open $idlFilesList\n";49 open FH, "< $idlFilesList" or die "Cannot open $idlFilesList\n"; 54 50 my @idlFiles = <FH>; 55 51 chomp(@idlFiles); … … 82 78 } 83 79 84 # FIXME: After supporting the new build flow in all build systems (bug 76970), 85 # we should remove this if statement. 86 if ($newBuildFlow) { 87 # The format of a supplemental dependency file: 88 # 89 # DOMWindow.idl(1000) P.idl(800) Q.idl(1200) R.idl(1000) 90 # Document.idl(1000) S.idl(800) 91 # Event.idl(1200) 92 # ... 93 # 94 # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, 95 # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. 96 # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. 97 # The number in () is the last access timestamp of the file. 98 open FH, ">", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n"; 99 foreach my $idlFile (sort keys %supplementals) { 100 print FH $idlFile . "(" . timestamp($idlFile) . ")"; 101 for my $supplementalIdlFile (@{$supplementals{$idlFile}}) { 102 print FH " " . $supplementalIdlFile . "(" . timestamp($supplementalIdlFile) . ")"; 103 } 104 print FH "\n"; 105 } 106 close FH; 107 } else { 108 # The format of a supplemental dependency file: 109 # 110 # DOMWindow.idl P.idl Q.idl R.idl 111 # Document.idl S.idl 112 # Event.idl 113 # ... 114 # 115 # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, 116 # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. 117 # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. 118 open FH, ">", $supplementalDependencyFile or die "Cannot open $supplementalDependencyFile\n"; 119 foreach my $idlFile (sort keys %supplementals) { 120 print FH $idlFile, " @{$supplementals{$idlFile}}\n"; 121 } 122 close FH; 80 # Outputs the dependency. 81 # The format of a supplemental dependency file: 82 # 83 # DOMWindow.idl P.idl Q.idl R.idl 84 # Document.idl S.idl 85 # Event.idl 86 # ... 87 # 88 # The above indicates that DOMWindow.idl is supplemented by P.idl, Q.idl and R.idl, 89 # Document.idl is supplemented by S.idl, and Event.idl is supplemented by no IDLs. 90 # The IDL that supplements another IDL (e.g. P.idl) never appears in the dependency file. 91 open FH, "> $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n"; 92 foreach my $idlFile (sort keys %supplementals) { 93 print FH $idlFile, " @{$supplementals{$idlFile}}\n"; 123 94 } 124 125 sub timestamp 126 { 127 my $file = shift; 128 return 0 if ! -e $file; 129 return (stat $file)[9]; 130 } 95 close FH;
Note: See TracChangeset
for help on using the changeset viewer.