summaryrefslogtreecommitdiff
path: root/build/fixwin32mak.pl
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-08-17 20:50:19 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-08-17 20:50:19 +0000
commit74f854b4860d8277d27d539017df689a462622ef (patch)
treec156dab185e06a5650d15d499be0149ecabf576b /build/fixwin32mak.pl
parent0c09e5842dd0d361858f063085643088b32df735 (diff)
downloadapr-74f854b4860d8277d27d539017df689a462622ef.tar.gz
Fix altroot substitution bug.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@567137 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/fixwin32mak.pl')
-rw-r--r--build/fixwin32mak.pl15
1 files changed, 10 insertions, 5 deletions
diff --git a/build/fixwin32mak.pl b/build/fixwin32mak.pl
index 9ee8918e9..3012984df 100644
--- a/build/fixwin32mak.pl
+++ b/build/fixwin32mak.pl
@@ -14,7 +14,9 @@ $root = cwd;
# 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 @@ sub fixcwd {
$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;
}