+2004-04-20 Alexandre Duret-Lutz <adl@gnu.org>
+
+ For PR automake/414:
+ Introduce options tar-v7, tar-ustar, and tar-pax to select
+ tar format.
+ * doc/automake.texi (Options): Document them.
+ * lib/Automake/Options.pm (_process_option_list): Process
+ these new options.
+ * lib/am/distdir.am (dist-gzip, dist-bzip2, dist-tarZ, dist,
+ distcheck): Adjust to use am__tar and am__untar.
+ * m4/tar.m4: New file.
+ * m4/Makefile.am (dist_m4data_DATA): Add tar.m4.
+ * m4/init.m4 (AM_INIT_AUTOMAKE): Support the new options
+ and call _AM_PROG_TAR.
+ * tests/tar.test, tests/tar2.test, tests/tar3.test: New files.
+ * tests/Makefile.am (TESTS): Add them.
+
2004-04-18 Alexandre Duret-Lutz <adl@gnu.org>
* lib/am/distdir.am (distcheck): Typo in shar decompression.
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
- $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
- $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
$(am__remove_distdir)
dist dist-all: distdir
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
* Diagnose AC_CONFIG_AUX_DIR calls following AM_INIT_AUTOMAKE. (PR/49)
+* Tar format can be chosen with the new options tar-v7, tar-ustar, and
+ tar-pax.
+
\f
New in 1.8:
m4_include([m4/runlog.m4])
m4_include([m4/sanity.m4])
m4_include([m4/strip.m4])
+m4_include([m4/tar.m4])
PACKAGE_BUGREPORT='bug-automake@gnu.org'
ac_unique_file="automake.in"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot APIVERSION pkgvdatadir PERL TEX LN MODIFICATION_DELAY GREP EGREP FGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar APIVERSION pkgvdatadir PERL TEX LN MODIFICATION_DELAY GREP EGREP FGREP LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
-s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@am__tar@,$am__tar,;t t
+s,@am__untar@,$am__untar,;t t
s,@APIVERSION@,$APIVERSION,;t t
s,@pkgvdatadir@,$pkgvdatadir,;t t
s,@PERL@,$PERL,;t t
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@file{subdir/file.cxx}, then the output file would be
@file{subdir/file.o}.
+@item @code{tar-v7}
+@itemx @code{tar-ustar}
+@itemx @code{tar-pax}
+These three mutually exclusive options select the tar format to use
+when generating tarballs with @code{make dist}. (The tar file created
+is then compressed according to the set of @code{no-dist-gzip},
+@code{dist-bzip2} and @code{dist-tarZ} options in use.)
+
+These options must be passed as argument to @code{AM_INIT_AUTOMAKE}
+(@xref{Macros}) because they can causes new configure check to be
+performed. Automake will complain if it sees such option in a
+@code{AUTOMAKE_OPTIONS} variable.
+
+@code{tar-v7} selects the old V7 tar format. This is the historical
+default. This antiquated format is understood by all tar
+implementations and supports filenames with up to 99 characters. When
+given longer filenames some tar implementations will diagnose the
+problem while other will generate broken tarballs or use non-portable
+extensions. Furthermore, the V7 format cannot store empty
+directories.
+
+@code{tar-ustar} selects the ustar format defined by POSIX
+1003.1-1988. This format is believed to be old enough to be portable.
+It fully supports directories, and stores filenames with up to 255
+characters. However you may run against broken tar implementations
+that incorrectly handle filenames longer than 99 characters (please
+report them to @email{bug-automake@@gnu.org} so we can document this
+accurately).
+
+@code{tar-pax} selects the new pax interchange format defined by POSIX
+1003.1-2001. It does not limit the length of filenames. However,
+this format is very young and should probably be restricted to
+packages which target only very modern platforms. There are moves to
+change the pax format in an upward-compatible way, so this option may
+refer to a more recent version in the future.
+
+@code{configure} knows several ways to construct these formats. It
+will not abort if it cannot find a tool up to the task (so that the
+package can still be built), but @code{make dist} will fail.
+
@item @var{version}
@cindex Option, version
A version number (e.g. @samp{0.30}) can be specified. If Automake is not
-@set UPDATED 2 April 2004
+@set UPDATED 20 April 2004
@set UPDATED-MONTH April 2004
@set EDITION 1.8a
@set VERSION 1.8a
-@set UPDATED 2 April 2004
+@set UPDATED 20 April 2004
@set UPDATED-MONTH April 2004
@set EDITION 1.8a
@set VERSION 1.8a
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
{
# Explicitly recognize these.
}
+ elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
+ {
+ error ($where,
+ "option `$_' must be an argument of AM_INIT_AUTOMAKE")
+ if $where->get !~ /^configure\./;
+ for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
+ {
+ next if $opt eq $_;
+ if (exists $options->{$opt})
+ {
+ error ($where,
+ "options `$_' and `$opt' are mutually exclusive");
+ last;
+ }
+ }
+ }
elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
{
# Got a version number.
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
GZIP_ENV = --best
.PHONY: dist-gzip
dist-gzip: distdir
- $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
.PHONY: dist-bzip2
dist-bzip2: distdir
- $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
.PHONY: dist-tarZ
dist-tarZ: distdir
- $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
.PHONY: dist dist-all
dist dist-all: distdir
-?GZIP? $(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
+?GZIP? tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+?BZIP2? tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+?COMPRESS? tardir=$(distdir) && $(am__tar) | 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)
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
regex.m4 \
runlog.m4 \
sanity.m4 \
-strip.m4
+strip.m4 \
+tar.m4
EXTRA_DIST = dirlist amversion.in
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
regex.m4 \
runlog.m4 \
sanity.m4 \
-strip.m4
+strip.m4 \
+tar.m4
EXTRA_DIST = dirlist amversion.in
all: all-am
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
--- /dev/null
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# 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])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+for _am_tool in ${am_cv_prog_tar_$1-gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none}
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -H $1 -L -o'
+ am__tar_='find "$tardir" -print | cpio -H $1 -L -o'
+ am__untar='cpio -H $1 -i'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
syntax.test \
tags.test \
tagsub.test \
+tar.test \
+tar2.test \
+tar3.test \
target-cflags.test \
targetclash.test \
txinfo.test \
$(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
$(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
$(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
- $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
VERSION = @VERSION@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
syntax.test \
tags.test \
tagsub.test \
+tar.test \
+tar2.test \
+tar3.test \
target-cflags.test \
targetclash.test \
txinfo.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Check the tar-ustar option.
+
+. ./defs || exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([tar], [1.0])
+AM_INIT_AUTOMAKE([tar-ustar])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE distcheck
+test -f tar-1.0.tar.gz
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Check the tar-pax option.
+
+. ./defs || exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([tar2], [1.0])
+AM_INIT_AUTOMAKE([tar-pax])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE distcheck
+test -f tar2-1.0.tar.gz
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Check the tar options diagnostics.
+
+. ./defs || exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([tar2], [1.0])
+AM_INIT_AUTOMAKE([tar-pax tar-v7])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'configure.in:2:.*mutually exclusive' stderr
+
+rm -rf autom4te.cache
+
+cat > configure.in << 'END'
+AC_INIT([tar2], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+echo 'AUTOMAKE_OPTIONS = tar-pax' > Makefile.am
+
+AUTOMAKE_fails
+grep 'Makefile.am:1:.*tar-pax.*AM_INIT_AUTOMAKE' stderr