From b043fba39e79692724b9003e92254043d984ce89 Mon Sep 17 00:00:00 2001 From: wrowe Date: Thu, 1 Apr 2010 03:40:51 +0000 Subject: Eliminate all external dependencies upon execution of fixwin32mak.pl, to guard the resulting mak/dep files from header dependency chains that are very specific to one version. This allows apr-util, for example, to build somewhere other than relative to ../apr. Backports: r929796 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@929797 13f79535-47bb-0310-9956-ffa450edef68 --- build/fixwin32mak.pl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build/fixwin32mak.pl b/build/fixwin32mak.pl index b559eeccf..49853b34b 100644 --- a/build/fixwin32mak.pl +++ b/build/fixwin32mak.pl @@ -135,6 +135,28 @@ sub fixcwd { print "Touched datestamp for " . $oname . " in " . $File::Find::dir . "\n"; } $oname =~ s/.mak$/.dep/; + $verchg = 0; + $srcfl = new IO::File $oname, "r" || die; + $dstfl = new IO::File $tname, "w" || die; + while ($src = <$srcfl>) { + if (($src =~ m/^\t"(\.\.\\)+(apr|apr-util|apr-iconv)\\.*"\\/) || + ($src =~ m/^\t{\$\(INCLUDE\)}".*"\\/)) { + $verchg = -1; + } + else { + print $dstfl $src; + } + } + undef $srcfl; + undef $dstfl; + if ($verchg) { + unlink $oname || die; + rename $tname, $oname || die; + print "Stripped external dependencies from " . $oname . " in " . $File::Find::dir . "\n"; + } + else { + unlink $tname || die; + } @ostat = stat($oname); if ($ostat[9] && $dstat[9] && ($ostat[9] != $dstat[9])) { @onames = ($oname); -- cgit v1.2.1