automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

1.6.2: patch-multi-inputs


From: hstenn
Subject: 1.6.2: patch-multi-inputs
Date: Tue, 30 Jul 2002 22:55:44 GMT

--- automake.in-        Mon Jun 10 10:19:07 2002
+++ automake.in Mon Jun 17 18:10:54 2002
@@ -1191,10 +1191,7 @@
          exit (1);
        }
 
-      # Handle $local:$input syntax.  Note that we only examine the
-      # first ":" file to see if it is automake input; the rest are
-      # just taken verbatim.  We still keep all the files around for
-      # dependency checking, however.
+      # Handle $local:$input syntax.
       my ($local, $input, @rest) = split (/:/, $arg);
       if (! $input)
        {
@@ -1205,8 +1202,35 @@
          # Strip .in; later on .am is tacked on.  That is how the
          # automake input file is found.  Maybe not the best way, but
          # it is easy to explain.
-         $input =~ s/\.in$//
-           or die "$me: invalid input file name `$arg'\n.";
+         ### Original
+         # Note that we only examine the first ":" file to see if it is
+         # automake input; the rest are just taken verbatim.  We still keep
+         # all the files around for dependency checking, however.
+         #$input =~ s/\.in$//
+         #  or die "$me: invalid input file name `$arg'\n.";
+         ### New
+         # Look for *.in for which *.am exists.
+         my @done = ();
+       InAm1:
+         {
+           do
+             {
+               if (($input =~ /^(.*)\.in$/) && -f $1.".am")
+                 {
+                   $input = $1;
+                   unshift @rest, @done;
+                   last InAm1;
+                 }
+               else
+                 {
+                   push @done, $input;
+                   $input = shift @rest;
+                 }
+             }
+               while $input;
+         }
+         die "$me: no input file found in `$arg'\n" unless ($input);
+         ###
        }
       push (@input_files, $input);
       $output_files{$input} = join (':', ($local, @rest));
@@ -4611,8 +4635,32 @@
         }
         else
         {
-            # FIXME: should be error if .in is missing.
-            $input =~ s/\.in$//;
+         ### Original
+         # FIXME: should be error if .in is missing.
+         #$input =~ s/\.in$//;
+         ### New
+         # Look for *.in for which *.am exists.
+         my @done = ();
+       InAm2:
+         {
+           do
+             {
+               if (($input =~ /^(.*)\.in$/) && -f $1.".am")
+                 {
+                   $input = $1;
+                   unshift @rest, @done;
+                   last InAm2;
+                 }
+               else
+                 {
+                   push @done, $input;
+                   $input = shift @rest;
+                 }
+             }
+               while $input;
+         }
+         die "$me: no input file found in `$config_files'\n" unless ($input);
+         ###
         }
 
         if (-f $input . '.am')



reply via email to

[Prev in Thread] Current Thread [Next in Thread]