Changeset 16342 in webkit


Ignore:
Timestamp:
Sep 13, 2006 12:08:39 AM (18 years ago)
Author:
aroben
Message:

Reviewed by eseidel.

Switch back to passing relative paths to generate-bindings.pl when
generating JS bindings.

  • DerivedSources.make: Pass in relative paths to generate-bindings.pl
  • bindings/scripts/CodeGenerator.pm: Make ScanDirectory never call chdir and always construct absolute paths instead.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r16341 r16342  
     12006-09-12  Adam Roben  <aroben@apple.com>
     2
     3        Reviewed by eseidel.
     4
     5        Switch back to passing relative paths to generate-bindings.pl when
     6        generating JS bindings.
     7
     8        * DerivedSources.make: Pass in relative paths to generate-bindings.pl
     9        * bindings/scripts/CodeGenerator.pm: Make ScanDirectory never call
     10        chdir and always construct absolute paths instead.
     11
    1122006-09-12  David Hyatt  <hyatt@apple.com>
    213
  • trunk/WebCore/DerivedSources.make

    r16337 r16342  
    516516
    517517DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h
    518         perl -I`pwd`/$(WebCore)/bindings/scripts `pwd`/$(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --include `pwd`/$(WebCore)/dom --include `pwd`/$(WebCore)/html --include `pwd`/$(WebCore)/xpath --include `pwd`/$(WebCore)/ksvg2/svg --outputdir `pwd` $<
     518        perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_OBJECTIVE_C" --generator ObjC --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/xpath --include $(WebCore)/ksvg2/svg --outputdir . $<
    519519
    520520# new-style JavaScript bindings
     
    529529
    530530JS%.h : %.idl $(JS_BINDINGS_SCRIPTS)
    531         perl -I`pwd`/$(WebCore)/bindings/scripts `pwd`/$(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --include `pwd`/$(WebCore)/dom --include `pwd`/$(WebCore)/html --include `pwd`/$(WebCore)/xml --include `pwd`/$(WebCore)/ksvg2/svg --outputdir `pwd` $<
     531        perl -I $(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --defines "$(FEATURE_DEFINES) LANGUAGE_JAVASCRIPT" --generator JS --include dom --include html --include xml --include ksvg2/svg --outputdir . $<
  • trunk/WebCore/bindings/scripts/CodeGenerator.pm

    r16337 r16342  
    4545                           "SVGAnimatedRect" => 1, "SVGAnimatedString" => 1,
    4646                           "SVGAnimatedTransformList" => 1);
    47    
     47
    4848# Helpers for 'ScanDirectory'
    4949my $endCondition = 0;
     
    209209    return if ($endCondition eq 1) and ($reportAllFiles eq 0);
    210210
    211     chdir($directory) or die "[ERROR] Can't enter directory $directory: \"$!\"\n";
    212     opendir(DIR, ".") or die "[ERROR] Can't open directory $directory: \"$!\"\n";
    213 
    214     my @names = readdir(DIR) or die "[ERROR] Cant't read directory $directory: \"$!\"\n";
     211    $thisDir = "$ENV{SOURCE_ROOT}/$directory";
     212    opendir(DIR, $thisDir) or die "[ERROR] Can't open directory $thisDir: \"$!\"\n";
     213
     214    my @names = readdir(DIR) or die "[ERROR] Cant't read directory $thisDir \"$!\"\n";
    215215    closedir(DIR);
    216216
     
    221221
    222222        # Recurisvely enter directory
    223         if (-d $name) {
    224             $object->ScanDirectory($interface, $name, $useDirectory, $reportAllFiles);
     223        if (-d "$thisDir/$name") {
     224            $object->ScanDirectory($interface, "$thisDir/$name", $useDirectory, $reportAllFiles);
    225225            next;
    226226        }
     
    231231
    232232        if ($condition) {
    233             $foundFilename = "$directory/$name";
     233            $foundFilename = "$thisDir/$name";
    234234
    235235            if ($reportAllFiles eq 0) {
     
    239239            }
    240240        }
    241 
    242         chdir($useDirectory) or die "[ERROR] Can't change directory to $useDirectory: \"$!\"\n";
    243241    }
    244242}
Note: See TracChangeset for help on using the changeset viewer.