tests: rename $am_testauxdir -> $am_testaux_srcdir
[automake.git] / t / ax / test-defs.in
bloba983183e8e0f9e5ab924ab5e58c57802a847952c
1 # -*- shell-script -*-
2 # @configure_input@
4 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 # Defines and minimal setup for Automake testing environment.
21 # IMPORTANT NOTES AND REQUIREMENTS
22 #   - Multiple inclusions of this file should be idempotent.
23 #   - This code has to be 'set -e' clean.
25 # See whether the current test script is expected to use TAP or not.
26 # Use a sensible default, while allowing the scripts to override this
27 # check.
28 if test -z "$am_test_protocol"; then
29   case $argv0 in
30     *.tap) am_test_protocol=tap;;
31         *) am_test_protocol=none;;
32   esac
35 am_rel_srcdir='@srcdir@'
36 am_top_srcdir='@abs_srcdir@'
37 am_top_builddir='@abs_builddir@'
39 # Where testsuite-related helper scripts, data files and shell libraries
40 # are placed.
41 am_testaux_srcdir=$am_top_srcdir/t/ax
43 # Support for the "installcheck" target.
44 case ${am_running_installcheck:=no} in
45   yes)
46     am_amdir='@amdir@'
47     am_automake_acdir='@automake_acdir@'
48     am_bindir='@bindir@'
49     am_datadir='@datadir@'
50     am_docdir='@docdir@'
51     am_pkgvdatadir='@pkgvdatadir@'
52     am_scriptdir='@scriptdir@'
53     am_system_acdir='@system_acdir@'
54     ;;
55   no)
56     am_amdir=$am_top_srcdir/lib/am
57     am_automake_acdir=$am_top_srcdir/m4
58     am_bindir=$am_top_builddir/t/wrap
59     am_datadir=$am_top_srcdir
60     am_docdir=$am_top_srcdir/doc
61     am_pkgvdatadir=$am_top_srcdir/lib
62     am_scriptdir=$am_top_srcdir/lib
63     am_system_acdir=$am_top_srcdir/m4/acdir
64     ;;
65   *)
66     echo "$me: variable 'am_running_installcheck' has invalid"
67          "value '$am_running_installcheck'" >&2
68     exit 99
69     ;;
70 esac
72 APIVERSION='@APIVERSION@'
73 PATH_SEPARATOR='@PATH_SEPARATOR@'
75 host_alias=${host_alias-'@host_alias@'}; export host_alias
76 build_alias=${build_alias-'@build_alias@'}; export build_alias
78 # A concurrency-safe "mkdir -p" implementation.
79 MKDIR_P=${AM_TESTSUITE_MKDIR_P-'@MKDIR_P@'}
81 # The shell we use to run our own test scripts, determined at configure
82 # time.  It is required in the self tests, and most importantly for the
83 # automatic re-execution of test scripts.
84 AM_TEST_RUNNER_SHELL=${AM_TEST_RUNNER_SHELL-'@AM_TEST_RUNNER_SHELL@'}
86 # Make sure we override the user shell.  And do not read the value of
87 # $SHELL from the environment (think to the non-uncommon situation where
88 # e.g., $SHELL=/bin/tcsh).
89 SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL
91 # User can override various tools used.  Prefer overriding specific for
92 # that automake testsuite, if they are available.
93 AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}}
94 PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
95 MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
96 YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}}
97 LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}}
98 AUTOCONF=${AM_TESTSUITE_AUTOCONF-${AUTOCONF-'@am_AUTOCONF@'}}
99 AUTOM4TE=${AM_TESTSUITE_AUTOM4TE-${AUTOM4TE-'@am_AUTOM4TE@'}}
100 AUTORECONF=${AM_TESTSUITE_AUTORECONF-${AUTORECONF-'@am_AUTORECONF@'}}
101 AUTOHEADER=${AM_TESTSUITE_AUTOHEADER-${AUTOHEADER-'@am_AUTOHEADER@'}}
102 AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
104 # Tests who want complete control over aclocal or automake command-line
105 # options should use $am_original_ACLOCAL or $am_original_AUTOMAKE.  The
106 # "test -z" tests take care not to re-initialize them if 'test-defs.sh'
107 # is re-sourced, as we want that file to remain really idempotent.
108 if test -z "$am_original_AUTOMAKE"; then
109   am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
111 if test -z "$am_original_ACLOCAL"; then
112   am_original_ACLOCAL=${AM_TESTSUITE_ACLOCAL-${ACLOCAL-"aclocal-$APIVERSION"}}
115 # Use -Werror because this also turns some Perl warnings into error.
116 # Tests for which this is inappropriate should use -Wno-error.
117 # Tests who want complete control over aclocal command-line options
118 # should use $am_original_ACLOCAL instead.
119 ACLOCAL="$am_original_ACLOCAL -Werror"
121 # See how Automake should be run.  We put --foreign as the default
122 # strictness to avoid having to create lots and lots of files.  A test
123 # can override this by specifying a different strictness.  Use -Wall
124 # -Werror by default.  Tests for which this is inappropriate (e.g. when
125 # testing that a warning is enabled by a specific switch) should use
126 # -Wnone or/and -Wno-error.
127 # Tests who want complete control over automake command-line options
128 # should use $am_original_AUTOMAKE instead.
129 AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror -Wall"
131 # POSIX no longer requires 'egrep' and 'fgrep',
132 # but some hosts lack 'grep -E' and 'grep -F'.
133 EGREP=${AM_TESTSUITE_EGREP-'@EGREP@'}
134 FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
136 # Compilers and their flags.  These can point to non-GNU compilers (and
137 # on non-Linux and non-BSD systems, they probably will).
138 CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
139 CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
140 F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
141 FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
142 CFLAGS=${AM_TESTSUITE_CFLAGS-${CFLAGS-'@CFLAGS@'}}
143 CXXFLAGS=${AM_TESTSUITE_CXXFLAGS-${CXXFLAGS-'@CXXFLAGS@'}}
144 FCFLAGS=${AM_TESTSUITE_FCFLAGS-${FCFLAGS-'@FCFLAGS@'}}
145 FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
146 CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
148 # GNU compilers and their flags.
149 GNU_CC=${AM_TESTSUITE_GNU_CC-${GNU_CC-'@GNU_CC@'}}
150 GNU_CXX=${AM_TESTSUITE_GNU_CXX-${GNU_CXX-'@GNU_CXX@'}}
151 GNU_F77=${AM_TESTSUITE_GNU_F77-${GNU_F77-'@GNU_F77@'}}
152 GNU_FC=${AM_TESTSUITE_GNU_FC-${GNU_FC-'@GNU_FC@'}}
153 GNU_FFLAGS=${AM_TESTSUITE_GNU_FFLAGS-${GNU_FFLAGS-'@GNU_FFLAGS@'}}
154 GNU_FCFLAGS=${AM_TESTSUITE_GNU_FCFLAGS-${GNU_FCFLAGS-'@GNU_FCFLAGS@'}}
155 GNU_CXXFLAGS=${AM_TESTSUITE_GNU_CXXFLAGS-${GNU_CXXFLAGS-'@GNU_CXXFLAGS@'}}
156 GNU_CFLAGS=${AM_TESTSUITE_GNU_CFLAGS-${GNU_CFLAGS-'@GNU_CFLAGS@'}}
157 GNU_GCJ=${AM_TESTSUITE_GNU_GCJ-${GNU_GCJ-'@GNU_GCJ@'}}
158 GNU_GCJFLAGS=${AM_TESTSUITE_GNU_GCJFLAGS-${GNU_GCJFLAGS-'@GNU_GCJFLAGS@'}}
160 # No all versions of Tex support '--version', so we use a configure
161 # check to decide if tex is available.  This decision is embodied in
162 # this variable.
163 TEX=${AM_TESTSUITE_TEX-'@TEX@'}
165 # The amount we should wait after modifying files depends on the platform.
166 # For instance, Windows '95, '98 and ME have 2-second granularity
167 # and can be up to 3 seconds in the future w.r.t. the system clock.
168 # The creative quoting is to avoid spuriously triggering a failure in
169 # the maintainer checks,
170 sleep='sleep ''@MODIFICATION_DELAY@'
172 # An old timestamp that can be given to a file, in "touch -t" format.
173 # The time stamp should be portable to all file systems of interest.
174 # Just for fun, choose the exact time of the announcement of the GNU project
175 # in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
176 old_timestamp=198309271735.59
178 # Make our wrapper script (or installed scripts, if running under
179 # "installcheck") accessible by default.  And avoid to uselessly
180 # extend $PATH multiple times if this file is sourced multiple times.
181 case $PATH in
182   $am_bindir$PATH_SEPARATOR*) ;;
183   *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
184 esac
186 export PATH