From: Ralf Wildenhues Date: Sun, 22 Mar 2009 08:53:19 +0000 (+0100) Subject: Define AM_RECURSIVE_TARGETS, for gnulib's GNUmakefile. X-Git-Tag: v1.10b~5^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9003cc9b747b87abd92d421891c0d7ec9e75e0d0;p=thirdparty%2Fautomake.git Define AM_RECURSIVE_TARGETS, for gnulib's GNUmakefile. This new macro lists all public targets which invoke `make' recursively, or depend on targets which do so. It allows to prevent parallelism selectively, when multiple targets are passed on the `make' command line. * lib/am/distdir.am [%?SUBDIRS%] (AM_RECURSIVE_TARGETS): New macro. * lib/am/subdirs.am (AM_RECURSIVE_TARGETS): Likewise. * lib/am/tags.am [%?SUBDIRS%] (AM_RECURSIVE_TARGETS): Likewise. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 1c2134142..a2baeb2e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-03-22 Ralf Wildenhues + + Define AM_RECURSIVE_TARGETS, for gnulib's GNUmakefile. + This new macro lists all public targets which invoke `make' + recursively, or depend on targets which do so. It allows to + prevent parallelism selectively, when multiple targets are + passed on the `make' command line. + * lib/am/distdir.am [%?SUBDIRS%] (AM_RECURSIVE_TARGETS): New + macro. + * lib/am/subdirs.am (AM_RECURSIVE_TARGETS): Likewise. + * lib/am/tags.am [%?SUBDIRS%] (AM_RECURSIVE_TARGETS): + Likewise. + 2009-03-14 Ralf Wildenhues * NEWS: Update. diff --git a/Makefile.in b/Makefile.in index 49f70c2d0..4224570e9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -87,6 +87,9 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index aa647c5e6..bae89fd63 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -84,6 +84,9 @@ am__installdirs = "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(perllibdir)" DATA = $(dist_perllib_DATA) $(nodist_perllib_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) diff --git a/lib/Makefile.in b/lib/Makefile.in index b6f9f1d96..47d0c7216 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -87,6 +87,9 @@ am__installdirs = "$(DESTDIR)$(pkgvdatadir)" "$(DESTDIR)$(scriptdir)" DATA = $(dist_pkgvdata_DATA) $(dist_script_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) diff --git a/lib/am/distdir.am b/lib/am/distdir.am index ad5e7713c..2f2d1766a 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -64,6 +64,10 @@ am__relativize = \ endif %?SUBDIRS% .PHONY: distdir +if %?SUBDIRS% +AM_RECURSIVE_TARGETS += distdir +endif %?SUBDIRS% + distdir: $(DISTFILES) ## ## For Gnits users, this is pretty handy. Look at 15 lines @@ -375,6 +379,10 @@ endif %?TOPDIR_P% if %?TOPDIR_P% .PHONY: dist dist-all +if %?SUBDIRS% +AM_RECURSIVE_TARGETS += dist dist-all +endif %?SUBDIRS% + dist dist-all: distdir ?GZIP? tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ?BZIP2? tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 @@ -395,6 +403,10 @@ endif %?TOPDIR_P% if %?TOPDIR_P% +if %?SUBDIRS% +AM_RECURSIVE_TARGETS += distcheck +endif %?SUBDIRS% + # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index 188804263..7fbb09ef9 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.am @@ -1,6 +1,6 @@ ## automake - create Makefile.in from Makefile.am ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, -## 2004, 2008 Free Software Foundation, Inc. +## 2004, 2008, 2009 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -18,6 +18,10 @@ RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +## All documented targets which invoke `make' recursively, or depend +## on targets that do so. +AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) .PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS) .MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS) diff --git a/lib/am/tags.am b/lib/am/tags.am index a654ec86d..1eabe5849 100644 --- a/lib/am/tags.am +++ b/lib/am/tags.am @@ -37,6 +37,9 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ETAGS = etags .PHONY: tags +if %?SUBDIRS% +AM_RECURSIVE_TARGETS += tags TAGS +endif %?SUBDIRS% tags: TAGS TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \ @@ -96,6 +99,9 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \ CTAGS = ctags .PHONY: CTAGS ctags +if %?SUBDIRS% +AM_RECURSIVE_TARGETS += ctags CTAGS +endif %?SUBDIRS% ctags: CTAGS ## We have a dummy name here because `tags' has already been in use