Fix for confh.test:
authorTom Tromey <tromey@redhat.com>
Sat, 10 Apr 1999 23:29:42 +0000 (23:29 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 10 Apr 1999 23:29:42 +0000 (23:29 +0000)
* automake.in (configure_input_files): New global.
(scan_configure): Set it.
(handle_configure): Use configure_input_files when determining
which subdirs have a Makefile.am.  Fixes confh.test.
(handle_configure): Only recognize acconfig.h in top srcdir.

ChangeLog
automake.in

index f6af931..7074dcc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+1999-04-11  Tom Tromey  <tromey@cygnus.com>
+
+       Fix for confh.test:
+       * automake.in (configure_input_files): New global.
+       (scan_configure): Set it.
+       (handle_configure): Use configure_input_files when determining
+       which subdirs have a Makefile.am.  Fixes confh.test.
+       (handle_configure): Only recognize acconfig.h in top srcdir.
+
 1999-04-10  Tom Tromey  <tromey@cygnus.com>
 
        * depend2.am (%.o): Use `$(*D)/$(*F)', not just `$(*F)'.
index 9766772..37a0a4d 100755 (executable)
@@ -148,6 +148,9 @@ $srcdir_name = '';
 @input_files = ();
 %output_files = ();
 
+# Complete list of Makefile.am's that exist.
+@configure_input_files = ();
+
 # List of files in AC_OUTPUT without Makefile.am, and their outputs.
 @other_input_files = ();
 # Line number at which AC_OUTPUT seen.
@@ -3091,12 +3094,15 @@ sub handle_configure
        &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
        &examine_variable ('CONFIGURE_DEPENDENCIES');
        $top_reldir = '';
+
+       &push_dist_common ('acconfig.h')
+           if -f 'acconfig.h';
     }
 
     # Make it easy to see if there is a Makefile.am in a given
     # directory.
     local (%make_dirs, $iter);
-    foreach $iter (@input_files)
+    foreach $iter (@configure_input_files)
     {
        $make_dirs{&dirname ($iter)} = 1;
     }
@@ -3188,10 +3194,6 @@ sub handle_configure
 
            # Header defined and in this directory.
            local (@files);
-           if (-f $relative_dir . '/acconfig.h')
-           {
-               push (@files, 'acconfig.h');
-           }
            if (-f $one_name . '.top')
            {
                push (@files, "${cn_sans_dir}.top");
@@ -3203,6 +3205,21 @@ sub handle_configure
 
            &push_dist_common (@files);
 
+           # For now, acconfig.h can only appear in the top srcdir.
+           if (-f 'acconfig.h')
+           {
+               if ($relative_dir eq '.')
+               {
+                   push (@files, 'acconfig.h');
+               }
+               else
+               {
+                   # Strange quoting because this gets fed through
+                   # Perl.
+                   push (@files, '\$(top_srcdir)/acconfig.h');
+               }
+           }
+
            local ($stamp_name) = 'stamp-h';
            $stamp_name .= "${hdr_index}" if scalar (@config_headers) > 1;
 
@@ -4462,6 +4479,8 @@ sub scan_configure
        %output_files = %make_list;
     }
 
+    @configure_input_files = @make_input_list;
+
     &am_conf_error ("\`PACKAGE' not defined in configure.in")
         if ! $seen_package;
     &am_conf_error ("\`VERSION' not defined in configure.in")