diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2007-08-17 20:51:15 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2007-08-17 20:51:15 +0000 |
commit | ed8b8d3688f77f98e6a8894d48ca54cc3686e8c5 (patch) | |
tree | f20836277e94a8310219e69f63d31854c3eb08e4 /build/fixwin32mak.pl | |
parent | 74f854b4860d8277d27d539017df689a462622ef (diff) | |
download | apr-ed8b8d3688f77f98e6a8894d48ca54cc3686e8c5.tar.gz |
Tabs? **tabs???** Mea culpa.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@567138 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/fixwin32mak.pl')
-rw-r--r-- | build/fixwin32mak.pl | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/build/fixwin32mak.pl b/build/fixwin32mak.pl index 3012984df..7efdc11bf 100644 --- a/build/fixwin32mak.pl +++ b/build/fixwin32mak.pl @@ -22,60 +22,60 @@ find(\&fixcwd, '.'); sub fixcwd { if (m|.mak$|) { $thisroot = $File::Find::dir; - $thisroot =~ s|^./(.*)$|$1|; - $thisroot =~ s|/|\\\\|g; + $thisroot =~ s|^./(.*)$|$1|; + $thisroot =~ s|/|\\\\|g; $thisroot = $root . "\\\\" . $thisroot; $thisaltroot = $altroot . "\\\\" . $thisroot; $oname = $_; - $tname = '.#' . $_; - $verchg = 0; - $srcfl = new IO::File $_, "r" || die; - $dstfl = new IO::File $tname, "w" || die; - while ($src = <$srcfl>) { - if ($src =~ m|^\s*($root[^\"]*)\".*$|) { - $orig = $thisroot; + $tname = '.#' . $_; + $verchg = 0; + $srcfl = new IO::File $_, "r" || die; + $dstfl = new IO::File $tname, "w" || die; + while ($src = <$srcfl>) { + if ($src =~ m|^\s*($root[^\"]*)\".*$|) { + $orig = $thisroot; } elsif ($src =~ m|^\s*($altroot[^\"]*)\".*$|) { - $orig = $thisaltroot; + $orig = $thisaltroot; } if (defined($orig)) { $repl = "cd \"."; while (!($src =~ s|$orig|$repl|)) { - if (!($orig =~ s|^(.*)\\\\[^\\]+$|$1|)) { + if (!($orig =~ s|^(.*)\\\\[^\\]+$|$1|)) { break; } - $repl .= "\\.."; - } -print "Replaced " . $orig . " with " . $repl . "\n"; - $verchg = -1; + $repl .= "\\.."; + } + print "Replaced " . $orig . " with " . $repl . "\n"; + $verchg = -1; undef $orig; - } + } print $dstfl $src; - } - undef $srcfl; - undef $dstfl; - if ($verchg) { - unlink $oname || die; - rename $tname, $oname || die; - print "Corrected absolute paths within " . $oname . " in " . $File::Find::dir . "\n"; - } - else { - unlink $tname; - } + } + undef $srcfl; + undef $dstfl; + if ($verchg) { + unlink $oname || die; + rename $tname, $oname || die; + print "Corrected absolute paths within " . $oname . " in " . $File::Find::dir . "\n"; + } + else { + unlink $tname; + } $dname = $oname; $dname =~ s/.mak$/.dsp/; - @dstat = stat($dname); + @dstat = stat($dname); @ostat = stat($oname); if ($ostat[9] && $dstat[9] && ($ostat[9] != $dstat[9])) { @onames = ($oname); utime $dstat[9], $dstat[9], @onames; - print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n"; + print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n"; } $oname =~ s/.mak$/.dep/; @ostat = stat($oname); if ($ostat[9] && $dstat[9] && ($ostat[9] != $dstat[9])) { @onames = ($oname); utime $dstat[9], $dstat[9], @onames; - print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n"; + print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n"; } } } |