]> sourceware.org Git - automake.git/commitdiff
* lib/am/configure.am (am__CONFIG_DISTCLEAN_FILES): New variable.
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 6 Jun 2002 08:34:39 +0000 (08:34 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 6 Jun 2002 08:34:39 +0000 (08:34 +0000)
(distclean): Use it.
(maintainer-clean): Delete autom4te.cache and
$(am__CONFIG_DISTCLEAN_FILES).
* tests/maintclean.test: New file.
* tests/Makefile.am (TESTS): Add maintclean.test.

ChangeLog
Makefile.in
lib/am/configure.am
tests/Makefile.am
tests/Makefile.in
tests/maintclean.test [new file with mode: 0755]

index e11000f01c38696538395b0ff17f044c6c78ddc6..f68ba2387e0a13bba4d99c4ba10a3fb712500b59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-06-06  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/am/configure.am (am__CONFIG_DISTCLEAN_FILES): New variable.
+       (distclean): Use it.
+       (maintainer-clean): Delete autom4te.cache and
+       $(am__CONFIG_DISTCLEAN_FILES).
+       * tests/maintclean.test: New file.
+       * tests/Makefile.am (TESTS): Add maintclean.test.
+
 2002-06-05  Miloslav Trmac  <trmac@popelka.ms.mff.cuni.cz>
 
        * lib/am/dejagnu.am (site.exp): Quote build_alias, host_alias, and
index d2bc8951699ed6f53fbf16ec44b79bfb7f5bed0a..8878d4520febb5e1766cec7fde3ad63e866973ca 100644 (file)
@@ -127,6 +127,8 @@ all: all-recursive
 
 .SUFFIXES:
 .SUFFIXES: .dvi .info .ps .texi
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log
 $(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
        cd $(top_srcdir) && \
          $(AUTOMAKE) --gnu  Makefile
@@ -506,7 +508,7 @@ clean: clean-recursive
 clean-am: clean-generic mostlyclean-am
 
 distclean: distclean-recursive
-       -rm -f config.status config.cache config.log
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
 distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
@@ -553,7 +555,8 @@ install-man:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
-
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+       -rm -rf autom4te.cache
 maintainer-clean-am: distclean-am maintainer-clean-aminfo \
        maintainer-clean-generic maintainer-clean-vti
 
index 465c57731a6912763fcaf9374b1a9a9dcaf3c021..bc1f34a52c6e2df4d94c2898e3035352687d909e 100644 (file)
@@ -83,10 +83,22 @@ endif %?TOPDIR_P%
 ## Makefile depends on config.status.
 
 if %?TOPDIR_P%
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log
 distclean:
-       -rm -f config.status config.cache config.log
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
 
 ## Note: you might think we should remove Makefile.in, configure, or
 ## aclocal.m4 here in a maintainer-clean rule.  However, the GNU
 ## Coding Standards explicitly prohibit this.
+
+maintainer-clean:
+       -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+## autom4te.cache is created by Autoconf; the only valid target to
+## remove it is maintainer-clean, not distclean.
+## If you have an autom4te.cache that cause distcheck to fail, then
+## it is good news: you finally discovered that autoconf and/or
+## autoheader is needed to use your tarball, which is wrong.
+       -rm -rf autom4te.cache
+
+
 endif %?TOPDIR_P%
index d96e2afa1bf7eb81d2d76461cf2e044e5d667b05..57c335ebe35435080aeac635e0ad8bf7acfd7a90 100644 (file)
@@ -216,6 +216,7 @@ lisp.test \
 listval.test \
 ltdeps.test \
 ltlibobjs.test \
+maintclean.test \
 make.test \
 makevars.test \
 man.test \
index acc61e5f12336d50a7f5283852a92d1168307946..d49919e5e9668d2d31b924b185eca78508ab50d2 100644 (file)
@@ -300,6 +300,7 @@ lisp.test \
 listval.test \
 ltdeps.test \
 ltlibobjs.test \
+maintclean.test \
 make.test \
 makevars.test \
 man.test \
diff --git a/tests/maintclean.test b/tests/maintclean.test
new file mode 100755 (executable)
index 0000000..a6991bf
--- /dev/null
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+# Make sure distclean and maintainer-clean erase the right files.
+
+. $srcdir/defs || exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES(bar)
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+noinst_DATA = foo.c
+
+foo.c:
+       touch foo.c
+
+MAINTAINERCLEANFILES = foo.c
+
+END
+
+touch bar.in
+
+# Since we don't require Yacc, make sure it's not used.
+export YACC=false
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+test -d autom4te.cache
+
+./configure
+test -f bar
+
+$MAKE
+test -f foo.c
+
+$MAKE distclean
+test ! -f bar
+test ! -f Makefile
+test ! -f config.status
+test -f foo.c
+test -d autom4te.cache
+
+./configure
+test -f bar
+
+$MAKE foo.c
+test -f foo.c
+
+$MAKE maintainer-clean
+test ! -f bar
+test ! -f foo.c
+test ! -f Makefile
+test ! -f config.status
+test ! -d autom4te.cache
This page took 0.114102 seconds and 5 git commands to generate.