summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-03-31 16:45:26 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-03-31 16:45:26 -0700
commit455bad28ec7120640750ecfca12ddacce27d5fe8 (patch)
treef791709de55e8069abfc127d02d5804d646e56b7
parent4cf99902de8708538843d9fc173549fde4868159 (diff)
parent323dabef4b3570798e2d9daedbba9b98e9d7a504 (diff)
downloadautomake-455bad28ec7120640750ecfca12ddacce27d5fe8.tar.gz
Merge branch 'minor'
-rw-r--r--bin/automake.in2
-rw-r--r--lib/am/distdir.am18
2 files changed, 17 insertions, 3 deletions
diff --git a/bin/automake.in b/bin/automake.in
index c1d1a8a0b..3abee49d2 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3741,7 +3741,7 @@ sub substitute_ac_subst_variables_worker
sub substitute_ac_subst_variables
{
my ($text) = @_;
- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+ $text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
return $text;
}
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 98f4c9c11..cc5c50290 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -309,6 +309,16 @@ endif %?TOPDIR_P%
## We order DIST_TARGETS by expected duration of the compressors,
## slowest first, for better parallelism in "make dist". Do not
## reorder DIST_ARCHIVES, users may expect gzip to be first.
+##
+## Traditionally, gzip prepended the contents of the GZIP environment
+## variable to its arguments, and the commands below formerly used
+## this by invoking 'GZIP=$(GZIP_ENV) gzip'. The GZIP environment
+## variable is now considered to be obsolescent, so the commands below
+## now use 'eval GZIP= gzip $(GZIP_ENV)' instead; this should work
+## with both older and newer gzip implementations. The 'eval' is to
+## support makefile assignments like 'GZIP_ENV = "-9 -n"' that quote
+## the GZIP_ENV right-hand side because that was needed with the
+## former invocation pattern.
if %?TOPDIR_P%
@@ -316,7 +326,7 @@ if %?TOPDIR_P%
GZIP_ENV = --best
.PHONY: dist-gzip
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
@@ -392,13 +402,17 @@ endif %?SUBDIRS%
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac