diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-01-11 04:57:28 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-01-11 04:57:28 +0000 |
commit | 614ed966d7c3c58c39975bbf42203f8c824948d9 (patch) | |
tree | ad4016d0ae72e1ced8baa059acf3f9085f9cb5c5 /build/fixwin32mak.pl | |
parent | 9d660fecbc48c47d1d3aabdb39b3319935dad808 (diff) | |
download | libapr-614ed966d7c3c58c39975bbf42203f8c824948d9.tar.gz |
Spent more time observing MSVC6's default syntax, change some
path delims to their 'preferred' style.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@495116 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/fixwin32mak.pl')
-rw-r--r-- | build/fixwin32mak.pl | 15 |
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; } |