From fcea22c906da553605c407284c105deb8f60caee Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 12 Aug 2012 18:08:25 +0200 Subject: [PATCH] [ng] dist: vars DIST_TARGETS and DIST_ARCHIVES are no more public Turn them into two internal variables. This will clean up the interface a bit, and make the new planned dist-related APIs (still to be implemented) simpler to use. * lib/am/distcheck.mk (DIST_TARGETS, DIST_ARCHIVES): Rename ... (am.dist.default-targets, am.dist.default-archives): ... like these, respectively. (distcheck, dist, dist-all): Adjust. * t/dist-formats.tap (nogzip): Likewise. * NG-NEWS: Update. Signed-off-by: Stefano Lattarini --- NG-NEWS | 19 +++++++++++-------- lib/am/distcheck.mk | 15 +++++++++------ t/dist-formats.tap | 2 +- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/NG-NEWS b/NG-NEWS index 7d3bc757e..8f3cf72b8 100644 --- a/NG-NEWS +++ b/NG-NEWS @@ -212,14 +212,17 @@ Distribution EXTRA_DIST = $(wildcard doc/*.txt $(srcdir)/doc/*.txt) # Better. -* The variables $(DISTFILES), $(DIST_COMMON) and $(DIST_SOURCES) had - never been documented in mainline Automake, and were always intended - to be internal variables. But that was not clear from their names. - So we have renamed rename like this: - - DISTFILES => am.dist.all-files - DIST_COMMON => am.dist.common-files - DIST_SOURCES => am.dist.sources +* The make variables $(DISTFILES), $(DIST_COMMON), $(DIST_SOURCES), + $(DIST_TARGETS), $(DIST_ARCHIVES) had never been documented + in mainline Automake, and were always intended to be internal + variables. But that was not clear from their names. So we have + renamed rename like this: + + DISTFILES => am.dist.all-files + DIST_COMMON => am.dist.common-files + DIST_SOURCES => am.dist.sources + DIST_TARGETS => am.dist.default-targets + DIST_ARCHIVES => am.dist.default-archives Do not use any of these variables in your Makefiles! diff --git a/lib/am/distcheck.mk b/lib/am/distcheck.mk index aec150022..6b81c45ed 100644 --- a/lib/am/distcheck.mk +++ b/lib/am/distcheck.mk @@ -90,8 +90,10 @@ am.dist.extract-archive-for-format = $(call $0.aux,$(strip $1)) # commit v0.0-7569-gec58403). So keep it. GZIP_ENV = --best -DIST_TARGETS = $(foreach x,$(am.dist.formats),dist-$x) -DIST_ARCHIVES = $(foreach x,$(am.dist.formats),$(distdir).$(am.dist.ext.$x)) +am.dist.default-targets = \ + $(foreach x,$(am.dist.formats),dist-$x) +am.dist.default-archives = \ + $(foreach x,$(am.dist.formats),$(distdir).$(am.dist.ext.$x)) .PHONY: $(am.dist.all-targets) $(am.dist.all-targets): dist-%: distdir @@ -109,7 +111,7 @@ endif .PHONY: dist dist-all dist dist-all: - $(MAKE) $(DIST_TARGETS) am.dist.post-remove-distdir='@:' + $(MAKE) $(am.dist.default-targets) am.dist.post-remove-distdir='@:' $(am.dist.post-remove-distdir) @@ -189,12 +191,13 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) dist \ ## Make sure to remove the dists we created in the test build directory. - && rm -rf $(DIST_ARCHIVES) \ + && rm -rf $(am.dist.default-archives) \ && $(MAKE) distcleancheck $(am.dist.post-remove-distdir) @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' + list='$(am.dist.default-archives)'; \ + for i in $$list; do echo $$i; done; \ + ) | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' # Define distuninstallcheck_listfiles and distuninstallcheck separately # from distcheck, so that they can be overridden by the user. diff --git a/t/dist-formats.tap b/t/dist-formats.tap index ee240aa48..d03fc7420 100755 --- a/t/dist-formats.tap +++ b/t/dist-formats.tap @@ -255,7 +255,7 @@ nogzip () unindent >> Makefile.am <