From: Tom Tromey Date: Wed, 7 Feb 2001 21:15:06 +0000 (+0000) Subject: * automake.in (handle_configure): Handle case where output file is X-Git-Tag: Release-1-4d~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a83155d5b3ca55cb3928629a6c50741ca0bb4a57;p=thirdparty%2Fautomake.git * automake.in (handle_configure): Handle case where output file is in subdir with no Makefile of its own. Fixes remake3.test, distcommon.test. --- diff --git a/ChangeLog b/ChangeLog index 68cdb94de..a346e9a49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-02-07 Tom Tromey + + * 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 * automake.in (handle_dependencies): Rename AM_INCLUDE to diff --git a/automake.in b/automake.in index 19f94d9b3..ef3c6bad5 100755 --- a/automake.in +++ b/automake.in @@ -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 diff --git a/configure b/configure index e81792fbc..ff3369e20 100755 --- 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