]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (handle_configure): Handle case where output file is
authorTom Tromey <tromey@redhat.com>
Wed, 7 Feb 2001 21:15:06 +0000 (21:15 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 7 Feb 2001 21:15:06 +0000 (21:15 +0000)
in subdir with no Makefile of its own.  Fixes remake3.test,
distcommon.test.

ChangeLog
automake.in
configure

index 68cdb94dedeb677d28e8330a7de1813ea268d579..a346e9a497ccb831bf3b5418e9550271f61ccde9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-07  Tom Tromey  <tromey@redhat.com>
+
+       * automake.in (handle_configure): Handle case where output file is
+       in subdir with no Makefile of its own.  Fixes remake3.test,
+       distcommon.test.
+
 2001-02-06  Pavel Roskin  <proski@gnu.org>
 
        * automake.in (handle_dependencies): Rename AM_INCLUDE to
index 19f94d9b35da39865f5b6e037e975ee323d2a59a..ef3c6bad52d46838572bcae2280fa49029f45c24 100755 (executable)
@@ -3462,9 +3462,9 @@ sub handle_configure
            # Normal usage.
            $file = $lfile;
            $local = &basename ($file);
-           @inputs = ($local . '.in');
+           @inputs = ($file . '.in');
            @rewritten_inputs =
-               &rewrite_inputs_into_dependencies (1, $file . '.in');
+               &rewrite_inputs_into_dependencies (1, @inputs);
            $need_rewritten = 0;
        }
 
@@ -3481,11 +3481,24 @@ sub handle_configure
            }
        }
 
-       # Skip files not in this directory.
-       next unless &dirname ($file) eq $relative_dir;
-
-       # Skip any file that is an automake input.
+       # We skip any automake input files, as they are handled
+       # elsewhere.  We also skip files that aren't in this
+       # directory.  However, if the file's directory does not have a
+       # Makefile, and we are currently doing `.', then we create a
+       # rule to rebuild the file in the subdir.
        next if -f $file . '.am';
+       local ($fd) = &dirname ($file);
+       if ($fd ne $relative_dir)
+       {
+           if ($relative_dir eq '.' && ! &is_make_dir ($fd))
+           {
+               $local = $file;
+           }
+           else
+           {
+               next;
+           }
+       }
 
        # Some users have been tempted to put `stamp-h' in the
        # AC_OUTPUT line.  This won't do the right thing, so we
index e81792fbcccfc45721c6db39af24a8580f9bc2cc..ff3369e204ca8f990e633fdbc089994d7dac2174 100755 (executable)
--- a/configure
+++ b/configure
@@ -676,7 +676,7 @@ else
   echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
 fi
 
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2