From 81afed567e1b8c8e3dbef0950801718b5a12263d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 8 May 2001 14:06:36 +0000 Subject: [PATCH] * distdir.am (dist-all): Build all the flavors using a single distdir. --- ChangeLog | 5 +++++ Makefile.am | 2 +- Makefile.in | 23 +++++++++++++++-------- NEWS | 1 + distdir.am | 34 ++++++++++++++++++++++++++++------ lib/am/Makefile.am | 2 +- lib/am/distdir.am | 34 ++++++++++++++++++++++++++++------ 7 files changed, 79 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index b131c4ea..27421e14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-05-08 Akim Demaille + + * distdir.am (dist-all): Build all the flavors using a single + distdir. + 2001-05-08 Akim Demaille * automake.in (&file_contents_internal): Apply the @cond_stack to diff --git a/Makefile.am b/Makefile.am index 152646e9..5e6cc64a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in -AUTOMAKE_OPTIONS = gnits 1.4 +AUTOMAKE_OPTIONS = gnits 1.4 dist-bzip2 MAINT_CHARSET = latin1 ## We need `.' in SUBDIRS because we want `check' to build `.' before diff --git a/Makefile.in b/Makefile.in index eb004c38..fcc02a79 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,7 +72,7 @@ _am_include = @_am_include@ _am_quote = @_am_quote@ install_sh = @install_sh@ -AUTOMAKE_OPTIONS = gnits 1.4 +AUTOMAKE_OPTIONS = gnits 1.4 dist-bzip2 MAINT_CHARSET = latin1 SUBDIRS = . m4 lib tests @@ -473,6 +473,10 @@ dist: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) + # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. @@ -540,8 +544,10 @@ clean: clean-recursive clean-am: clean-generic mostlyclean-am -dist-all: dist - +dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) distclean: distclean-recursive -rm -f config.status distclean-am: clean-am distclean-generic distclean-tags @@ -604,11 +610,12 @@ uninstall-am: uninstall-binSCRIPTS uninstall-dist_amDATA \ uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) all all-am check check-am clean \ - clean-generic clean-recursive dist dist-all dist-info distcheck \ - distclean distclean-generic distclean-recursive distclean-tags \ - distdir dvi dvi-am dvi-recursive info info-am info-recursive \ - install install-am install-binSCRIPTS install-data \ - install-data-am install-data-recursive install-dist_amDATA \ + clean-generic clean-recursive dist dist-all dist-bzip2 \ + dist-info distcheck distclean distclean-generic \ + distclean-recursive distclean-tags distdir dvi dvi-am \ + dvi-recursive info info-am info-recursive install install-am \ + install-binSCRIPTS install-data install-data-am \ + install-data-recursive install-dist_amDATA \ install-dist_pkgdataDATA install-dist_scriptDATA install-exec \ install-exec-am install-exec-recursive install-info \ install-info-recursive install-man install-recursive \ diff --git a/NEWS b/NEWS index 67fb0d70..cbf7eba2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ New in 1.4e: * Support for `configure.ac'. * Support for `else COND', `endif COND' and negated conditions `!COND'. +* `make dist-all' is much faster. New in 1.4b: * Faster AM_INIT_AUTOMAKE (requires update of `missing' script) diff --git a/distdir.am b/distdir.am index 2f375215..fe754c1d 100644 --- a/distdir.am +++ b/distdir.am @@ -155,14 +155,13 @@ endif %?TOPDIR_P% if %?TOPDIR_P% GZIP_ENV = --best -.PHONY: dist-all dist -dist-all: dist +.PHONY: dist dist: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) if %?BZIP2% -.PHONY dist-all: dist-bzip2 +.PHONY: dist-bzip2 dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -170,7 +169,7 @@ endif %?BZIP2% if %?COMPRESS% -.PHONY dist-all: dist-tarZ +.PHONY: dist-tarZ dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -178,7 +177,7 @@ endif %?COMPRESS% if %?SHAR% -.PHONY dist-all: dist-shar +.PHONY: dist-shar dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -186,7 +185,7 @@ endif %?SHAR% if %?ZIP% -.PHONY dist-all: dist-zip +.PHONY: dist-zip dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) @@ -196,6 +195,29 @@ endif %?ZIP% endif %?TOPDIR_P% + +## ------------------------------------------------- ## +## Building all the requested distribution flavors. ## +## ------------------------------------------------- ## + +## Currently we cannot use if/endif inside a rule. The file_contents +## parser needs work. + +if %?TOPDIR_P% + +.PHONY: dist-all +dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +?BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 +?COMPRESS? $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z +?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz +?ZIP? -rm -f $(distdir).zip +?ZIP? zip -rq $(distdir).zip $(distdir) + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) + +endif %?TOPDIR_P% + + ## ------------------------- ## ## Checking a distribution. ## ## ------------------------- ## diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 152646e9..5e6cc64a 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in -AUTOMAKE_OPTIONS = gnits 1.4 +AUTOMAKE_OPTIONS = gnits 1.4 dist-bzip2 MAINT_CHARSET = latin1 ## We need `.' in SUBDIRS because we want `check' to build `.' before diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 2f375215..fe754c1d 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -155,14 +155,13 @@ endif %?TOPDIR_P% if %?TOPDIR_P% GZIP_ENV = --best -.PHONY: dist-all dist -dist-all: dist +.PHONY: dist dist: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) if %?BZIP2% -.PHONY dist-all: dist-bzip2 +.PHONY: dist-bzip2 dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -170,7 +169,7 @@ endif %?BZIP2% if %?COMPRESS% -.PHONY dist-all: dist-tarZ +.PHONY: dist-tarZ dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -178,7 +177,7 @@ endif %?COMPRESS% if %?SHAR% -.PHONY dist-all: dist-shar +.PHONY: dist-shar dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) @@ -186,7 +185,7 @@ endif %?SHAR% if %?ZIP% -.PHONY dist-all: dist-zip +.PHONY: dist-zip dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) @@ -196,6 +195,29 @@ endif %?ZIP% endif %?TOPDIR_P% + +## ------------------------------------------------- ## +## Building all the requested distribution flavors. ## +## ------------------------------------------------- ## + +## Currently we cannot use if/endif inside a rule. The file_contents +## parser needs work. + +if %?TOPDIR_P% + +.PHONY: dist-all +dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +?BZIP2? $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 +?COMPRESS? $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z +?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz +?ZIP? -rm -f $(distdir).zip +?ZIP? zip -rq $(distdir).zip $(distdir) + -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) + +endif %?TOPDIR_P% + + ## ------------------------- ## ## Checking a distribution. ## ## ------------------------- ## -- 2.43.5