The new file is meant to be idempotent w.r.t. mutiple inclusions.
* tests/defs.in: Removed, its contents split among ...
* tests/defs-static.in: ... this new file ...
* tests/defs: ... and this new file, including the former.
* configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
`tests/defs-static'.
(AC_CONFIG_LINKS): Add `tests/defs'.
* tests/Makefile.am ($(parallel_tests)): Update.
($(instspc_tests)): Likewise.
* tests/.gitignore: Update.
2010-11-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Tests defs: move static definitions in a new file `defs-static'.
+ The new file is meant to be idempotent w.r.t. mutiple inclusions.
+ * tests/defs.in: Removed, its contents split among ...
+ * tests/defs-static.in: ... this new file ...
+ * tests/defs: ... and this new file, including the former.
+ * configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
+ `tests/defs-static'.
+ (AC_CONFIG_LINKS): Add `tests/defs'.
+ * tests/Makefile.am ($(parallel_tests)): Update.
+ ($(instspc_tests)): Likewise.
+ * tests/.gitignore: Update.
+
Tests defs: $testsbuilddir is now AC_SUBST'ed.
* tests/defs.in ($testsbuilddir): Substitute from @abs_builddir@.
Add sanity check on $testsbuilddir, similar to those on
sh_errexit_works=$am_cv_sh_errexit_works
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs"
+ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs-static"
+
+ac_config_links="$ac_config_links tests/defs:tests/defs"
ac_config_files="$ac_config_files tests/aclocal-${APIVERSION}:tests/aclocal.in"
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
+config_links="$ac_config_links"
_ACEOF
Configuration files:
$config_files
+Configuration links:
+$config_links
+
Report bugs to <bug-automake@gnu.org>.
GNU Automake home page: <http://www.gnu.org/software/automake/>.
General help using GNU software: <http://www.gnu.org/gethelp/>."
"lib/am/Makefile") CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;;
"m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- "tests/defs") CONFIG_FILES="$CONFIG_FILES tests/defs" ;;
+ "tests/defs-static") CONFIG_FILES="$CONFIG_FILES tests/defs-static" ;;
+ "tests/defs") CONFIG_LINKS="$CONFIG_LINKS tests/defs:tests/defs" ;;
"tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
"tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/automake-${APIVERSION}:tests/automake.in" ;;
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
fi
# Have a temporary directory for convenience. Make it in the build tree
fi # test -n "$CONFIG_FILES"
-eval set X " :F $CONFIG_FILES "
+eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS "
shift
for ac_tag
do
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
+
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
esac
lib/am/Makefile
m4/Makefile
tests/Makefile
- tests/defs
+ tests/defs-static
])
+AC_CONFIG_LINKS([tests/defs:tests/defs])
AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
[chmod +x tests/aclocal-${APIVERSION}],
[APIVERSION=$APIVERSION])
aclocal-*
automake-*
-defs
+defs-static
instspc-tests.am
parallel-tests.am
*.dir
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
echo '# Ensure proper definition of $$testsrcdir.'; \
- echo 'am_skip_defs=yes'; \
- echo '. ./defs || exit 99'; \
+ echo '. ./defs-static || exit 99'; \
echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "# Run the test with Automake's parallel-tests driver enabled."; \
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
echo '# Ensure proper definition of $$testsrcdir.'; \
- echo 'am_skip_defs=yes'; \
- echo '. ./defs || exit 99'; \
+ echo '. ./defs-static || exit 99'; \
echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "instspc_test_name='$$name'"; \
POST_UNINSTALL = :
build_triplet = @build@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in \
- $(srcdir)/instspc-tests.am $(srcdir)/parallel-tests.am
+ $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs \
+ $(srcdir)/defs-static.in $(srcdir)/instspc-tests.am \
+ $(srcdir)/parallel-tests.am
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
-CONFIG_CLEAN_FILES = defs aclocal-${APIVERSION} automake-${APIVERSION}
-CONFIG_CLEAN_VPATH_FILES =
+CONFIG_CLEAN_FILES = defs-static aclocal-${APIVERSION} \
+ automake-${APIVERSION}
+CONFIG_CLEAN_VPATH_FILES = defs
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-defs: $(top_builddir)/config.status $(srcdir)/defs.in
+defs-static: $(top_builddir)/config.status $(srcdir)/defs-static.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
aclocal-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/aclocal.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
echo '# Ensure proper definition of $$testsrcdir.'; \
- echo 'am_skip_defs=yes'; \
- echo '. ./defs || exit 99'; \
+ echo '. ./defs-static || exit 99'; \
echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "# Run the test with Automake's parallel-tests driver enabled."; \
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
echo '# Ensure proper definition of $$testsrcdir.'; \
- echo 'am_skip_defs=yes'; \
- echo '. ./defs || exit 99'; \
+ echo '. ./defs-static || exit 99'; \
echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "instspc_test_name='$$name'"; \
# -*- shell-script -*-
-# @configure_input@
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Defines for Automake testing environment.
-# Tom Tromey <tromey@cygnus.com>
-
-
-## --------------------------------------------------------------------- ##
-## Shell and environment sanitizing (plus some early initializations). ##
-## --------------------------------------------------------------------- ##
-
-# Absolutely necessary variable(s).
-testsrcdir='@abs_srcdir@'
-top_testsrcdir='@abs_top_srcdir@'
-testbuilddir='@abs_builddir@'
-
-# Protect this file against multiple inclusion, useful for generated tests.
-if test x"$am_skip_defs" = xyes; then
- unset am_skip_defs
-
-else # Do proper testcase setup.
-
-# Be more Bourne compatible.
-# (Snippet copied from configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-
-# The name of the current test (without the `.test' suffix.)
-me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
-
-
-## ----------------------------------------------------------- ##
-## Initialization: AC_SUBST'ed and/or environment variables. ##
-## ----------------------------------------------------------- ##
-
-APIVERSION='@APIVERSION@'
-PATH_SEPARATOR='@PATH_SEPARATOR@'
-
-# Make sure we override the user shell.
-SHELL='@SHELL@'; export SHELL
-# User can override various tools used.
-test -z "$PERL" && PERL='@PERL@'
-test -z "$MAKE" && MAKE=make
-test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
-test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
-test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
-test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
-# Use -Werror because this also turns some Perl warnings into error.
-# (Tests for which this is inappropriate should use -Wno-error.)
-test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
-# Extra flags to pass to aclocal before all other flags added by this script.
-ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
-
-# See how Automake should be run. We put --foreign as the default
-# strictness to avoid having to create lots and lots of files. A test
-# can override this by specifying a different strictness. Use -Wall
-# -Werror by default. Tests for which this is inappropriate
-# (e.g. when testing that a warning is enabled by a specific switch)
-# should use -Wnone or/and -Wno-error
-test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
-
-# POSIX no longer requires 'egrep' and 'fgrep',
-# but some hosts lack 'grep -E' and 'grep -F'.
-EGREP='@EGREP@'
-FGREP='@FGREP@'
-
-# The amount we should wait after modifying files depends on the platform.
-# For instance, Windows '95, '98 and ME have 2-second granularity
-# and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
-
-# An old timestamp that can be given to a file, in "touch -t" format.
-# The time stamp should be portable to all file systems of interest.
-# Just for fun, choose the exact time of the announcement of the GNU project
-# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
-old_timestamp=198309271735.59
-
-# Make our wrapper scripts accessible by default.
-PATH="$testbuilddir$PATH_SEPARATOR$PATH"; export PATH
-
-
## -------------------------------------------------------- ##
-## Initialization: sanity checks and environment cleanup. ##
+## Source static setup and definitions for the testsuite. ##
## -------------------------------------------------------- ##
# Ensure we are running from the right directory.
-test -f ./defs || {
- echo "$me: ./defs: not found in current directory" >&2
+test -f ./defs-static || {
+ echo "$0: ./defs-static: not found in current directory" >&2
exit 1
}
+# Source the shell sanitization and variables' definitions.
+. ./defs-static || exit 99
+
+# The name of the current test (without the `.test' suffix.)
+me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+
+
+## ---------------------------------------- ##
+## Sanity checks and environment cleanup. ##
+## ---------------------------------------- ##
+
# Ensure $testsrcdir is set correctly.
-test -f "$testsrcdir/defs.in" || {
- echo "$me: $testsrcdir/defs.in not found, check \$testsrcdir" >&2
+test -f "$testsrcdir/defs-static.in" || {
+ echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2
exit 1
}
# Ensure $testbuilddir is set correctly.
-test -f "$testbuilddir/defs" || {
- echo "$me: $testbuilddir/defs not found, check \$testbuilddir" >&2
+test -f "$testbuilddir/defs-static" || {
+ echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2
exit 1
}
tex)
# No all versions of Tex support `--version', so we use
# a configure check.
- test -n "@TEX@" || exit 77
+ test -n "$TEX" || exit 77
;;
texi2dvi-o)
# Texi2dvi supports `-o' since Texinfo 4.1.
# some third-party .m4 file is underquoted.
case " $required " in
*' libtool '* | *' libtoolize '* | *' gettext '* )
- aclocaldir='@prefix@/share/aclocal'
+ aclocaldir=$testprefix/share/aclocal
extra_includes=""
if test -f $aclocaldir/dirlist; then
extra_includes=`
cd ./$testSubDir
-sh_errexit_works=@sh_errexit_works@
if test "$sh_errexit_works" = yes; then
trap 'exit_status=$?
set +e
set -x
pwd
-
-fi # Proper testcase setup.
--- /dev/null
+# -*- shell-script -*-
+# @configure_input@
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010 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, see <http://www.gnu.org/licenses/>.
+
+# Defines and minimal setup for Automake testing environment.
+# IMPORTANT: Multiple inclusions of this file should be idempotent!
+
+# Be more Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+testsrcdir='@abs_srcdir@'
+top_testsrcdir='@abs_top_srcdir@'
+testbuilddir='@abs_builddir@'
+testprefix='@prefix@'
+
+APIVERSION='@APIVERSION@'
+PATH_SEPARATOR='@PATH_SEPARATOR@'
+
+# Make sure we override the user shell.
+SHELL='@SHELL@'; export SHELL
+# User can override various tools used.
+test -z "$PERL" && PERL='@PERL@'
+test -z "$MAKE" && MAKE=make
+test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
+test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
+test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
+test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
+# Use -Werror because this also turns some Perl warnings into error.
+# (Tests for which this is inappropriate should use -Wno-error.)
+test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
+# Extra flags to pass to aclocal before all other flags added by this script.
+ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
+
+# See how Automake should be run. We put --foreign as the default
+# strictness to avoid having to create lots and lots of files. A test
+# can override this by specifying a different strictness. Use -Wall
+# -Werror by default. Tests for which this is inappropriate
+# (e.g. when testing that a warning is enabled by a specific switch)
+# should use -Wnone or/and -Wno-error
+test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
+
+# POSIX no longer requires 'egrep' and 'fgrep',
+# but some hosts lack 'grep -E' and 'grep -F'.
+EGREP='@EGREP@'
+FGREP='@FGREP@'
+
+# No all versions of Tex support `--version', so we use a configure
+# check to decide if tex is available. This decision is embodied in
+# this variable.
+TEX='@TEX@'
+
+# Whether /bin/sh has working 'set -e' with exit trap.
+sh_errexit_works='@sh_errexit_works@'
+
+# The amount we should wait after modifying files depends on the platform.
+# For instance, Windows '95, '98 and ME have 2-second granularity
+# and can be up to 3 seconds in the future w.r.t. the system clock.
+sleep='sleep @MODIFICATION_DELAY@'
+
+# An old timestamp that can be given to a file, in "touch -t" format.
+# The time stamp should be portable to all file systems of interest.
+# Just for fun, choose the exact time of the announcement of the GNU project
+# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
+old_timestamp=198309271735.59
+
+# Make our wrapper scripts accessible by default. And avoid to uselessly
+# extend $PATH multiple times if this file is sourced multiple times.
+case $PATH in
+ "$testbuilddir$PATH_SEPARATOR"*) ;;
+ *) PATH="$testbuilddir$PATH_SEPARATOR$PATH";;
+esac
+export PATH