libtool/tests/testsuite.at
Gary V. Vaughan 32f1e626b8 Add a search path option to libtoolize so that we can run it from
the testsuite without pulling in the last installed macros and
ltdl sources:

* libtoolize.m4sh:  Add a -I option to change libtoolize's search
path for macro files, and libltdl master sources.
(pkgvdatadir, pkgvmacrodir): Renamed...
(pkgvdatadirs, pkgvmacrodirs): ...as they can now contain a ':'
delimited list of directories.  Adjust all callers.
(func_copy_all_from_path): New function to search a ':' delimited
search path for a directory to copy.
(func_serial_update, func_ltmain_update, func_config_update): New
first parameter is a filename to search for.  srcdir parameter can
now be a ':' delimited search path.  Adjust all callers.
(func_copy_some_files): Ditto.
Put srcfile_spec first in parameter list for consistency with
other functions.  Adjust all callers.
(func_copy_cb): func_copy adapter function to call func_copy
correctly from func_copy_some_files.
(func_filename_path_search): Return the full path to the first
occurence of a named file found in a list of directories.
* tests/testsuite.at (LIBTOOLIZE): Wrap exported LIBTOOLIZE
initialisation in PREPARE_TESTS diversion to stop it being
discarded when testsuite is generated.
(AT_LIBTOOLIZE): Factor out libtoolize calls,
and set search path to find macros and libltdl source files from
the source tree.
(AT_CHECK_LIBTOOLIZE): Test it.
(AT_BOOTSTRAP): Adjust.  Split out call to make.
* tests/am-subdir.at: Call make explicitly.
(Makefile.am): Fix typo in ACLOCAL_AMFLAGS,
2004-11-29 13:50:54 +00:00

65 lines
1.8 KiB
Plaintext

# Process with autom4te to create an -*- Autotest -*- test suite.
# Test suite for GNU Libtool.
# Copyright 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.
m4_divert_push([PREPARE_TESTS])dnl
: ${LIBTOOLIZE="${abs_top_builddir}/libtoolize"}
export LIBTOOLIZE
m4_divert_pop([PREPARE_TESTS])dnl
# AT_LIBTOOLIZE([ARGS])
# ---------------------
m4_define([AT_LIBTOOLIZE],
["$LIBTOOLIZE" -I "$abs_top_srcdir" -I "$abs_top_srcdir/config" $1
])
# AT_CHECK_LIBTOOLIZE(ARGS, [EXIT-STATUS = 0], [STDOUT = `'], [STDERR = `'])
# --------------------------------------------------------------------------
m4_define([AT_CHECK_LIBTOOLIZE],
[AT_CHECK([AT_LIBTOOLIZE([$1])],
[$2], [$3], [$4])
])
# AT_BOOTSTRAP
# ------------
m4_define([AT_BOOTSTRAP],
[
test -f ./ltmain.sh || AT_LIBTOOLIZE([--copy])
test -f ./configure || autoreconf --force --verbose --install
test -f ./configure || exit 1
./configure
])
# We use `dnl' in zillions of places...
m4_pattern_allow([^dnl$])
# We exercise these tools.
AT_TESTED([grep autoreconf autom4te automake])
## ----------- ##
## The suite. ##
## ----------- ##
AT_INIT
# Torturing subdir-objects builds
m4_include([am-subdir.at])