apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1528804 - in /apr/apr/branches/1.5.x: ./ build/fixwin32mak.pl
Date Thu, 03 Oct 2013 10:53:43 GMT
Author: rjung
Date: Thu Oct  3 10:53:42 2013
New Revision: 1528804

URL: http://svn.apache.org/r1528804
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.

Backport of r929796 from trunk. Already backported
to 1.4.x as r929797.

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/build/fixwin32mak.pl

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r929796

Modified: apr/apr/branches/1.5.x/build/fixwin32mak.pl
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/build/fixwin32mak.pl?rev=1528804&r1=1528803&r2=1528804&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/build/fixwin32mak.pl (original)
+++ apr/apr/branches/1.5.x/build/fixwin32mak.pl Thu Oct  3 10:53:42 2013
@@ -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