You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2007/08/17 22:50:20 UTC
svn commit: r567137 - /apr/apr/trunk/build/fixwin32mak.pl
Author: wrowe
Date: Fri Aug 17 13:50:19 2007
New Revision: 567137
URL: http://svn.apache.org/viewvc?view=rev&rev=567137
Log:
Fix altroot substitution bug.
Modified:
apr/apr/trunk/build/fixwin32mak.pl
Modified: apr/apr/trunk/build/fixwin32mak.pl
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/fixwin32mak.pl?view=diff&rev=567137&r1=567136&r2=567137
==============================================================================
--- apr/apr/trunk/build/fixwin32mak.pl (original)
+++ apr/apr/trunk/build/fixwin32mak.pl Fri Aug 17 13:50:19 2007
@@ -14,7 +14,9 @@
# ignore our own direcory (allowing us to move into any parallel tree)
$root =~ s|^.:(.*)?$|cd "$1|;
$root =~ s|/|\\\\|g;
-print "Testing " . $root . "\n";
+$altroot = $root;
+$altroot =~ s| ".:| "|;
+print "Stripping " . $root . " and " . $altroot . "\n";
find(\&fixcwd, '.');
sub fixcwd {
@@ -23,26 +25,29 @@
$thisroot =~ s|^./(.*)$|$1|;
$thisroot =~ s|/|\\\\|g;
$thisroot = $root . "\\\\" . $thisroot;
+ $thisaltroot = $altroot . "\\\\" . $thisroot;
$oname = $_;
$tname = '.#' . $_;
$verchg = 0;
-#print "Processing " . $thisroot . " of " . $_ . "\n";
$srcfl = new IO::File $_, "r" || die;
$dstfl = new IO::File $tname, "w" || die;
while ($src = <$srcfl>) {
if ($src =~ m|^\s*($root[^\"]*)\".*$|) {
-#print "Found " . $1 . "\"\n";
$orig = $thisroot;
+ } elsif ($src =~ m|^\s*($altroot[^\"]*)\".*$|) {
+ $orig = $thisaltroot;
+ }
+ if (defined($orig)) {
$repl = "cd \".";
while (!($src =~ s|$orig|$repl|)) {
-#print "Tried replacing " . $orig . " with " . $repl . "\n";
if (!($orig =~ s|^(.*)\\\\[^\\]+$|$1|)) {
break;
}
$repl .= "\\..";
}
-#print "Replaced " . $orig . " with " . $repl . "\n";
+print "Replaced " . $orig . " with " . $repl . "\n";
$verchg = -1;
+ undef $orig;
}
print $dstfl $src;
}