Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.



Canonical link: https://commits.webkit.org/13706@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed Sep 13, 2006
1 parent d0b4301 commit 44728a5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
11 changes: 11 additions & 0 deletions WebCore/ChangeLog
@@ -1,3 +1,14 @@
2006-09-12 Adam Roben <aroben@apple.com>

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.

2006-09-12 David Hyatt <hyatt@apple.com>

Fix for bug 3244, implement html4 label support.
Expand Down
4 changes: 2 additions & 2 deletions WebCore/DerivedSources.make
Expand Up @@ -515,7 +515,7 @@ OBJC_BINDINGS_SCRIPTS = \
#

DOM%.h : %.idl $(OBJC_BINDINGS_SCRIPTS) bindings/objc/PublicDOMInterfaces.h
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` $<
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 . $<

# new-style JavaScript bindings

Expand All @@ -528,4 +528,4 @@ JS_BINDINGS_SCRIPTS = \
#

JS%.h : %.idl $(JS_BINDINGS_SCRIPTS)
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` $<
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 . $<
16 changes: 7 additions & 9 deletions WebCore/bindings/scripts/CodeGenerator.pm
Expand Up @@ -44,7 +44,7 @@ my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
"SVGAnimatedPreserveAspectRatio" => 1,
"SVGAnimatedRect" => 1, "SVGAnimatedString" => 1,
"SVGAnimatedTransformList" => 1);

# Helpers for 'ScanDirectory'
my $endCondition = 0;
my $foundFilename = "";
Expand Down Expand Up @@ -208,10 +208,10 @@ sub ScanDirectory

return if ($endCondition eq 1) and ($reportAllFiles eq 0);

chdir($directory) or die "[ERROR] Can't enter directory $directory: \"$!\"\n";
opendir(DIR, ".") or die "[ERROR] Can't open directory $directory: \"$!\"\n";
$thisDir = "$ENV{SOURCE_ROOT}/$directory";
opendir(DIR, $thisDir) or die "[ERROR] Can't open directory $thisDir: \"$!\"\n";

my @names = readdir(DIR) or die "[ERROR] Cant't read directory $directory: \"$!\"\n";
my @names = readdir(DIR) or die "[ERROR] Cant't read directory $thisDir \"$!\"\n";
closedir(DIR);

foreach my $name (@names) {
Expand All @@ -220,8 +220,8 @@ sub ScanDirectory
next if ($endCondition eq 1) or ($name =~ /^\./);

# Recurisvely enter directory
if (-d $name) {
$object->ScanDirectory($interface, $name, $useDirectory, $reportAllFiles);
if (-d "$thisDir/$name") {
$object->ScanDirectory($interface, "$thisDir/$name", $useDirectory, $reportAllFiles);
next;
}

Expand All @@ -230,16 +230,14 @@ sub ScanDirectory
$condition = 1 if ($interface eq "allidls") and ($name =~ /\.idl$/);

if ($condition) {
$foundFilename = "$directory/$name";
$foundFilename = "$thisDir/$name";

if ($reportAllFiles eq 0) {
$endCondition = 1;
} else {
push(@foundFilenames, $foundFilename);
}
}

chdir($useDirectory) or die "[ERROR] Can't change directory to $useDirectory: \"$!\"\n";
}
}

Expand Down

0 comments on commit 44728a5

Please sign in to comment.