[svn:parrot] r43344 - branches/one_make/tools/dev

coke at svn.parrot.org coke at svn.parrot.org
Thu Dec 31 15:21:20 UTC 2009


Author: coke
Date: Thu Dec 31 15:21:15 2009
New Revision: 43344
URL: https://trac.parrot.org/parrot/changeset/43344

Log:
deal with include'd makefiles when checking dependencies.

Modified:
   branches/one_make/tools/dev/checkdepend.pl

Modified: branches/one_make/tools/dev/checkdepend.pl
==============================================================================
--- branches/one_make/tools/dev/checkdepend.pl	Thu Dec 31 14:28:42 2009	(r43343)
+++ branches/one_make/tools/dev/checkdepend.pl	Thu Dec 31 15:21:15 2009	(r43344)
@@ -84,6 +84,20 @@
     local undef $/;
     $rules = <$mf>;
 }
+close $mf;
+
+# inline all "include"'d Makefiles;
+while ($rules =~ /^include\s+(.*)$/m) {
+    my $sub_makefile = $1;
+    open my $smf, '<', $sub_makefile;
+    my $subrules;
+    {
+        local undef $/;
+        $subrules = <$smf>;
+    }
+    close $smf;
+    $rules =~ s/^include\s+$sub_makefile$/$subrules/m;
+}
 
 # convert all \-newline continuations into single lines for ease of processing.
 $rules =~ s/\\\n//g;


More information about the parrot-commits mailing list