summaryrefslogtreecommitdiff
path: root/m4/tar.m4
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-01-03 16:12:46 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-01-06 14:54:29 +0100
commit01c3294bac3b67004d208449fe9460fc3ab61ee4 (patch)
treefb519e1b3a87b66c1b46af03e84e1939b880f2d9 /m4/tar.m4
parent741a0a1e94ce855fcd2109d5557a924e792b9320 (diff)
downloadautomake-01c3294bac3b67004d208449fe9460fc3ab61ee4.tar.gz
dist: do not wrap calls to 'tar' with the 'missing' script
The `missing' script is meant to allow non-developers to build a package in the face of slightly-skewed timestamps (as might happen e.g. when the package is obtained from a VCS checkout rather than from a distribution tarball). It is *not* the business of the `missing' script to try to provide wrappers for all the maintainer tools (in this case, to tool being a decent tar program). Such wrapping of `tar' was not only inappropriate, but it was also preventing the legitimate overriding (at make runtime) of the `tar' program used in the creation of the distribution tarballs. See also automake bug#9822. * lib/missing: Don't try to specially wrap `tar' invocations anymore. * m4/tar.m4 (_AM_PROG_TAR): In the definitions of the `AMTAR' variable, do not wrap the `tar' invocation with the `missing' script anymore. Instead, allow the user to override the intended tar program at make runtime, by defining the `TAR' environment variable. [$1 == v7]: Similarly for the definitions of the `am__tar' and `am__untar' variables. Since we are at it, don't make them depend anymore on the definition of the obsolescent `AMTAR' variable. * NEWS: Update. * tests/missing-tar.test: Remove, it's obsolete. * tests/tar-override.test: New test. * tests/Makefile.am (TESTS): Update. Reported by Akim Demaille.
Diffstat (limited to 'm4/tar.m4')
-rw-r--r--m4/tar.m49
1 files changed, 5 insertions, 4 deletions
diff --git a/m4/tar.m4 b/m4/tar.m4
index a4a00ecf0..0683951ba 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -1,6 +1,6 @@
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -22,10 +22,11 @@
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])