apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r929798 - /apr/apr/branches/1.3.x/build/fixwin32mak.pl
Date Thu, 01 Apr 2010 03:41:00 GMT
Author: wrowe
Date: Thu Apr  1 03:41:00 2010
New Revision: 929798

URL: http://svn.apache.org/viewvc?rev=929798&view=rev
Log:
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

Modified:
    apr/apr/branches/1.3.x/build/fixwin32mak.pl

Modified: apr/apr/branches/1.3.x/build/fixwin32mak.pl
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.3.x/build/fixwin32mak.pl?rev=929798&r1=929797&r2=929798&view=diff
==============================================================================
--- apr/apr/branches/1.3.x/build/fixwin32mak.pl (original)
+++ apr/apr/branches/1.3.x/build/fixwin32mak.pl Thu Apr  1 03:41:00 2010
@@ -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);



Mime
View raw message