Erase stamps from the Makefile that generates them.
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 6 May 2002 19:10:42 +0000 (19:10 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 6 May 2002 19:10:42 +0000 (19:10 +0000)
* automake.in (handle_configure): Append each used stamp to
@distclean_config.  Don't warn about stamp-h in AC_OUTPUT, this
file is not used anymore.
* lib/am/clean.am (distclean-generic): Don't erase stamp-h and
stamp-h[0-9]*.
* tests/subdir6.test: New file.
* tests/Makefile.am (TESTS): Add it.

ChangeLog
automake.in
lib/am/clean.am
stamp-vti
tests/Makefile.am
tests/Makefile.in
tests/subdir6.test [new file with mode: 0755]
version.texi

index f6bc9aa..9dd4b8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2002-05-06  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
+       Erase stamps from the Makefile that generates them.
+
+       * automake.in (handle_configure): Append each used stamp to
+       @distclean_config.  Don't warn about stamp-h in AC_OUTPUT, this
+       file is not used anymore.
+       * lib/am/clean.am (distclean-generic): Don't erase stamp-h and
+       stamp-h[0-9]*.
+       * tests/subdir6.test: New file.
+       * tests/Makefile.am (TESTS): Add it.
+
+2002-05-06  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
        Fix for condd.test (conditional `+='):
        * automake.in (%appendvar): New.
        (initialize_per_input): Clear it.
index cde6166..5191d74 100755 (executable)
@@ -3942,7 +3942,7 @@ sub handle_configure
                              'CONFIG_H_PATH' => $config_h_path,
                              'STAMP'         => "$stamp"));
 
-           push @distclean_config, $cn_sans_dir;
+           push @distclean_config, $cn_sans_dir, $stamp;
        }
     }
 
@@ -4031,17 +4031,6 @@ sub handle_configure
            }
        }
 
-       # Some users have been tempted to put `stamp-h' in the
-       # AC_OUTPUT line.  This won't do the right thing, so we
-       # explicitly fail here.
-       if ($local eq 'stamp-h')
-       {
-           # FIXME: allow real filename.
-           file_error ($ac_config_files_location,
-                       'stamp-h should not appear in AC_OUTPUT');
-           next;
-       }
-
        my @rewritten_inputs = rewrite_inputs_into_dependencies (1, @inputs);
        $output_rules .= ($local . ': '
                          . '$(top_builddir)/config.status '
index 7d40c68..f436a9e 100644 (file)
@@ -29,7 +29,7 @@ clean-generic:
 
 distclean-am: distclean-generic clean-am
 distclean-generic:
-       -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
 ?DISTCLEAN?    -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-am: maintainer-clean-generic distclean-am
index b5432b2..d55fd1d 100644 (file)
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 22 April 2002
-@set UPDATED-MONTH April 2002
+@set UPDATED 6 May 2002
+@set UPDATED-MONTH May 2002
 @set EDITION 1.6a
 @set VERSION 1.6a
index 2cf6d14..14613f9 100644 (file)
@@ -311,6 +311,7 @@ subdir2.test \
 subdir3.test \
 subdir4.test \
 subdir5.test \
+subdir6.test \
 subdirbuiltsources.test \
 subdircond.test \
 subobj.test \
index f15f02e..a814f82 100644 (file)
@@ -395,6 +395,7 @@ subdir2.test \
 subdir3.test \
 subdir4.test \
 subdir5.test \
+subdir6.test \
 subdirbuiltsources.test \
 subdircond.test \
 subobj.test \
@@ -605,7 +606,7 @@ mostlyclean-generic:
 clean-generic:
 
 distclean-generic:
-       -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+       -rm -f Makefile $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
diff --git a/tests/subdir6.test b/tests/subdir6.test
new file mode 100755 (executable)
index 0000000..535c358
--- /dev/null
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+# Test to make sure config headers in subdirectories are cleaned.
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
+AC_OUTPUT
+END
+
+touch Makefile.am
+mkdir sub
+
+$ACLOCAL
+$AUTOCONF
+touch sub/config.hin
+$AUTOMAKE
+./configure
+test -f sub/stamp-h1
+$MAKE clean
+test -f sub/stamp-h1
+$MAKE distclean
+test -f sub/stamp-h1 && exit 1
+:
index b5432b2..d55fd1d 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 22 April 2002
-@set UPDATED-MONTH April 2002
+@set UPDATED 6 May 2002
+@set UPDATED-MONTH May 2002
 @set EDITION 1.6a
 @set VERSION 1.6a