From 90368d48c53b6595845cd7e8d640e7f7db1f9339 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 23 Dec 2000 20:26:10 +0000 Subject: [PATCH] * subdirs.am (maintainer-clean-recursive): Use DIST_SUBDIRS for distclean and maintainer-clean. * automake.texi (Top level): Document use of DIST_SUBDIRS. --- ChangeLog | 4 ++++ automake.texi | 8 ++++++++ lib/am/subdirs.am | 10 +++++++++- stamp-vti | 2 +- subdirs.am | 10 +++++++++- version.texi | 2 +- 6 files changed, 32 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 653c86e3..a8d71d1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-12-23 Tom Tromey + * 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. diff --git a/automake.texi b/automake.texi index e21d7d2b..221199b4 100644 --- a/automake.texi +++ b/automake.texi @@ -1445,6 +1445,14 @@ can do this by putting @samp{.} into @code{SUBDIRS}. For instance, 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 diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index adb36726..b6f80ab6 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.am @@ -56,7 +56,15 @@ mostlyclean-recursive clean-recursive distclean-recursive \ 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; \ diff --git a/stamp-vti b/stamp-vti index ba02ac6d..a4d9ab6a 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 21 December 2000 +@set UPDATED 23 December 2000 @set UPDATED-MONTH December 2000 @set EDITION 1.4a @set VERSION 1.4a diff --git a/subdirs.am b/subdirs.am index adb36726..b6f80ab6 100644 --- a/subdirs.am +++ b/subdirs.am @@ -56,7 +56,15 @@ mostlyclean-recursive clean-recursive distclean-recursive \ 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; \ diff --git a/version.texi b/version.texi index ba02ac6d..a4d9ab6a 100644 --- a/version.texi +++ b/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 21 December 2000 +@set UPDATED 23 December 2000 @set UPDATED-MONTH December 2000 @set EDITION 1.4a @set VERSION 1.4a -- 2.43.5