(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-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
.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
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
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
## 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%
listval.test \
ltdeps.test \
ltlibobjs.test \
+maintclean.test \
make.test \
makevars.test \
man.test \
listval.test \
ltdeps.test \
ltlibobjs.test \
+maintclean.test \
make.test \
makevars.test \
man.test \
--- /dev/null
+#! /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