2 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check that the user can override the tar program used by "make dist"
18 # at runtime, by redefining the 'TAR' environment variable.
19 # FIXME: currently this works only when the tar format used is 'v7'
20 # FIXME: (which is the default one).
24 cwd
=$
(pwd) || fatal_
"getting current working directory"
26 echo AC_OUTPUT
>> configure.ac
30 echo $1 > am--tar-has-run
36 cat > Makefile.am
<<'END'
38 test -f am--tar-has-run
39 CLEANFILES = am--tar-has-run
48 test -f $me-1.0.
tar.gz
49 ls |
grep has-run
&& exit 1
51 rm -f *.
tar.
* *has-run
*
53 TAR
="$cwd/am--tar foo" $MAKE distcheck
54 test -f $me-1.0.
tar.gz
55 test "$(cat am--tar-has-run)" = foo
57 rm -f *.
tar.
* *has-run
*
60 # Creative use of eval to pacify maintainer checks.
61 eval \$
'MAKE dist "TAR=./am--tar mu"'
62 test -f $me-1.0.
tar.gz
63 test "$(cat am--tar-has-run)" = mu