Changeset 106913 in webkit


Ignore:
Timestamp:
Feb 7, 2012 12:54:04 AM (12 years ago)
Author:
haraken@chromium.org
Message:

Unreviewed, rolling out r106862.
http://trac.webkit.org/changeset/106862
https://bugs.webkit.org/show_bug.cgi?id=77510

Mac build fails if we manually remove generated code

  • DerivedSources.make:
  • bindings/scripts/generate-bindings.pl:

(generateEmptyHeaderAndCpp):

  • bindings/scripts/resolve-supplemental.pl:
  • bindings/scripts/update-idl-needs-rebuild.pl: Removed.
Location:
trunk/Source/WebCore
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106912 r106913  
     12012-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
    1152012-02-07  Kaustubh Atrawalkar  <kaustubh@motorola.com>
    216
  • trunk/Source/WebCore/DerivedSources.make

    r106862 r106913  
    585585
    586586JS_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-rebuild
    588587
    589588WEB_DOM_HEADERS :=
    590589ifeq ($(findstring BUILDING_WX,$(FEATURE_DEFINES)), BUILDING_WX)
    591590WEB_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)
    593591endif # BUILDING_WX
    594592
    595593all : \
    596594    $(JS_DOM_HEADERS) \
    597     $(JS_IDL_NEEDS_REBUILDS) \
    598     \
    599595    $(WEB_DOM_HEADERS) \
    600     $(CPP_IDL_NEEDS_REBUILDS) \
    601596    \
    602597    JSJavaScriptCallFrame.h \
     
    918913JS_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorJS.pm
    919914
    920 SUPPLEMENTAL_DEPENDENCY_FILE = ./supplemental.dep
     915SUPPLEMENTAL_DEPENDENCY_FILE = ./supplemental_dependency.tmp
    921916IDL_FILES_TMP = ./idl_files.tmp
     917ADDITIONAL_IDLS = $(WebCore)/inspector/JavaScriptCallFrame.idl
    922918
    923919# The following two lines get a space character stored in a variable.
     
    926922space +=
    927923
    928 $(SUPPLEMENTAL_DEPENDENCY_FILE) : $(RESOLVE_SUPPLEMENTAL_SCRIPTS) $(BINDING_IDLS) $(WebCore)/inspector/JavaScriptCallFrame.idl
    929         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 $@ --newBuildFlow
     924$(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 $@
    931927        rm -f $(IDL_FILES_TMP)
    932928
    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
     929JS%.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
    938932
    939933# Inspector interfaces generator
     
    961955CPP_BINDINGS_SCRIPTS = $(GENERATE_SCRIPTS) bindings/scripts/CodeGeneratorCPP.pm
    962956
    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 $< --newBuildFlow
     957WebDOM%.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) $<
    965959endif # BUILDING_WX
    966960
     
    972966
    973967OBJC_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
     969all : $(OBJC_DOM_HEADERS)
    977970
    978971all : CharsetData.cpp
     
    1005998
    1006999DOM_BINDINGS_SCRIPTS = $(GENERATE_BINDING_SCRIPTS) bindings/scripts/CodeGeneratorObjC.pm
    1007 DOM%.h : %.idl-needs-rebuild $(DOM_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h
    1008         $(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 $< --newBuildFlow
     1000DOM%.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) $<
    10091002
    10101003-include $(OBJC_DOM_HEADERS:.h=.dep)
  • trunk/Source/WebCore/bindings/scripts/generate-bindings.pl

    r106862 r106913  
    5151my $supplementalDependencyFile;
    5252my $additionalIdlFilesList;
    53 my $idlNeedsRebuildFile;
    54 my $newBuildFlow;
    5553
    5654GetOptions('include=s@' => \@idlDirectories,
     
    6563           'write-dependencies' => \$writeDependencies,
    6664           '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);
    7266
    7367my $targetIdlFile = $ARGV[0];
    7468
    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 
    8769die('Must specify input file.') unless defined($targetIdlFile);
    88 die('Must specify generator.') unless defined($generator);
     70die('Must specify generator') unless defined($generator);
    8971die('Must specify output directory.') unless defined($outputDirectory);
    9072
     
    10183my @supplementedIdlFiles;
    10284if ($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;
    129101        }
    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;
    152104
    153105    # The file $additionalIdlFilesList contains one IDL file per line:
     
    159111    # but should generate .h and .cpp files.
    160112    if (!$idlFound and $additionalIdlFilesList) {
    161         open FH, "<", $additionalIdlFilesList or die "Cannot open $additionalIdlFilesList\n";
     113        open FH, "< $additionalIdlFilesList" or die "Cannot open $additionalIdlFilesList\n";
    162114        my @idlFiles = <FH>;
    163115        chomp(@idlFiles);
     
    256208*/
    257209";
    258     open FH, ">", "${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n";
     210    open FH, "> ${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n";
    259211    print FH $contents;
    260212    close FH;
    261213
    262     open FH, ">", "${outputDirectory}/${cppName}" or die "Cannot open $cppName\n";
     214    open FH, "> ${outputDirectory}/${cppName}" or die "Cannot open $cppName\n";
    263215    print FH $contents;
    264216    close FH;
  • trunk/Source/WebCore/bindings/scripts/resolve-supplemental.pl

    r106862 r106913  
    3232my $idlFilesList;
    3333my $supplementalDependencyFile;
    34 my $newBuildFlow;
    3534
    3635GetOptions('defines=s' => \$defines,
     
    3837           'verbose' => \$verbose,
    3938           '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);
    4440
    4541die('Must specify #define macros using --defines.') unless defined($defines);
     
    5147}
    5248
    53 open FH, "<", $idlFilesList or die "Cannot open $idlFilesList\n";
     49open FH, "< $idlFilesList" or die "Cannot open $idlFilesList\n";
    5450my @idlFiles = <FH>;
    5551chomp(@idlFiles);
     
    8278}
    8379
    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.
     91open FH, "> $supplementalDependencyFile" or die "Cannot open $supplementalDependencyFile\n";
     92foreach my $idlFile (sort keys %supplementals) {
     93    print FH $idlFile, " @{$supplementals{$idlFile}}\n";
    12394}
    124 
    125 sub timestamp
    126 {
    127     my $file = shift;
    128     return 0 if ! -e $file;
    129     return (stat $file)[9];
    130 }
     95close FH;
Note: See TracChangeset for help on using the changeset viewer.