Define AM_RECURSIVE_TARGETS, for gnulib's GNUmakefile.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 22 Mar 2009 08:53:19 +0000 (09:53 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 22 Mar 2009 08:53:19 +0000 (09:53 +0100)
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 <Ralf.Wildenhues@gmx.de>
ChangeLog
Makefile.in
lib/Automake/Makefile.in
lib/Makefile.in
lib/am/distdir.am
lib/am/subdirs.am
lib/am/tags.am

index 1c213414213ab097741dc42a408e122b86ac5b5d..a2baeb2e4de3a9e4741e06a6ef14fbcbcdd9ed9f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-03-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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  <Ralf.Wildenhues@gmx.de>
 
        * NEWS: Update.
index 49f70c2d0c20030bb208dc2dcb3c998a1bc567d1..4224570e963e2e30b83304ea5734bd45f92eea23 100644 (file)
@@ -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)
index aa647c5e632ff1a1ddc2287387fe2da80986412b..bae89fd632276085335d8cc2746a8241d1d51f4f 100644 (file)
@@ -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)
index b6f9f1d96563a12becc13fdf288f76c30a8c676e..47d0c721697d90eedde5357347de762f159f5bb4 100644 (file)
@@ -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)
index ad5e7713c47bc2d0695659161b9b4fc576fb4362..2f2d1766ad9ae4e9cb1c2f7178438529c2e17088 100644 (file)
@@ -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.
index 18880426324b8a9a086bf1f50d49aad937ffb7fa..7fbb09ef9de058d2c510742c15f017d9670b46b4 100644 (file)
@@ -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
 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)
index a654ec86db978d242df3c7eb21a21b030841d917..1eabe5849b9644c9c360202b6609f210a9909011 100644 (file)
@@ -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