distclean and maintainer-clean.
* automake.texi (Top level): Document use of DIST_SUBDIRS.
2000-12-23 Tom Tromey <tromey@redhat.com>
+ * subdirs.am (maintainer-clean-recursive): Use DIST_SUBDIRS for
+ distclean and maintainer-clean.
+ * automake.texi (Top level): Document use of DIST_SUBDIRS.
+
From Rusty Ballinger:
* automake.in (handle_java): Don't skip `noinst' prefix.
putting @samp{.} first will cause a @samp{prefix} ordering of
directories.
+Sometimes, such as when running @code{make dist}, you want all possible
+subdirectories to be examined. In this case Automake will use
+@code{DIST_SUBDIRS}, instead of @code{SUBDIRS}, to determine where to
+recurse. This variable will also be used when the user runs
+@code{distclean} or @code{maintainer-clean}. It should be set to the
+full list of subdirectories in the project. If this macro is not set,
+Automake will attempt to set it for you.
+
@node Programs, Other objects, Top level, Top
@chapter Building Programs and Libraries
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+## For distclean and maintainer-clean we make sure to use the full
+## list of subdirectories. We do this so that `configure; make
+## distclean' really is a no-op, even if SUBDIRS is conditional. For
+## other clean targets this doesn't matter.
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
-@set UPDATED 21 December 2000
+@set UPDATED 23 December 2000
@set UPDATED-MONTH December 2000
@set EDITION 1.4a
@set VERSION 1.4a
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
- rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+## For distclean and maintainer-clean we make sure to use the full
+## list of subdirectories. We do this so that `configure; make
+## distclean' really is a no-op, even if SUBDIRS is conditional. For
+## other clean targets this doesn't matter.
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
-@set UPDATED 21 December 2000
+@set UPDATED 23 December 2000
@set UPDATED-MONTH December 2000
@set EDITION 1.4a
@set VERSION 1.4a