mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-12-09 06:40:24 +08:00
6f5427b530
* tests/defs: Find and set the value of CC probed by libtool.m4 * tests/link-2.test: Use a .lo wrapper script, and the value of CC set by defs instead of hardcoding gcc. * tests/link.test: Use the value of CC set by defs instead of hardcoding gcc. * tests/quote.test: Ditto. * tests/suffix.test: Ditto.
38 lines
1003 B
Bash
Executable File
38 lines
1003 B
Bash
Executable File
#! /bin/sh
|
|
# suffix.test - check that libtool knows how to transform source suffices.
|
|
|
|
# Extensions taken from the ones that Automake recognizes, plus Objective C,
|
|
# and GNU Ada.
|
|
extensions="C F S ada adb ads asm c c++ cc cpp cxx f f90 for m s"
|
|
bad_names="foo."
|
|
|
|
# Test script header.
|
|
need_prefix=no
|
|
if test -z "$srcdir"; then
|
|
srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
|
|
test "$srcdir" = "$0" && srcdir=.
|
|
test "${VERBOSE+set}" != "set" && VERBOSE=yes
|
|
fi
|
|
. $srcdir/defs || exit 1
|
|
|
|
status=0
|
|
for ext in $extensions; do
|
|
# Try a sample compile command.
|
|
if ($libtool -n --mode=compile compiler -c foo.$ext 2>&1; exit 0) | grep 'cannot'; then
|
|
status=1
|
|
else
|
|
echo "recognized foo.$ext as a valid source file"
|
|
fi
|
|
done
|
|
|
|
# Make sure that invalid suffixes are not recognized.
|
|
for name in $bad_names; do
|
|
if ($libtool -n --mode=compile compiler -c $name 2>&1; exit 0) | grep 'cannot'; then :
|
|
else
|
|
echo "incorrectly recognized $name as a valid source file"
|
|
status=1
|
|
fi
|
|
done
|
|
|
|
exit $status
|