mirror of
git://git.savannah.gnu.org/libtool.git
synced 2024-11-27 06:09:57 +08:00
17915a088c
* demo/Makefile.am: renamed hell.debug to hell.static (we're demonstrating static linking, not debugging) * tests/demo*: ditto * doc/libtool.texi (libltdl): documented new lt_dlopen(NULL) feature * libltdl/acconfig.h: required for config.h * libltdl/configure.in: use config.h * libltdl/ltdl.c: use config.h, support lt_dlopen(NULL) (returns a handle for the program itself) * ltconfig.in: minor reformatting * ltmain.in: in lt_preloaded_symbols always define the program's symbols first, for -export-dynamic list all program symbols together, -export-symbols was broken for programs, minor reformatting * mdemo/Makefile.am: renamed mdemo.debug to mdemo.static * tests/mdemo*: ditto, mdemo.test was completely broken
81 lines
1.7 KiB
Bash
81 lines
1.7 KiB
Bash
#! /bin/sh
|
|
# demo.test - try building in the ../demo subdirectory
|
|
|
|
# Test script header.
|
|
need_prefix=yes
|
|
if test -z "$srcdir"; then
|
|
srcdir=.
|
|
test "${VERBOSE+set}" != "set" && VERBOSE=yes
|
|
fi
|
|
. $srcdir/defs || exit 1
|
|
|
|
# Maybe we have a VPATH build, in which case, create a new subdir.
|
|
test -d ../demo || mkdir ../demo
|
|
|
|
# Change to our build directory.
|
|
cd ../demo || exit 1
|
|
|
|
# Possibly clean up the distribution.
|
|
if test -f config.cache; then
|
|
echo "= Running make distclean in ../demo"
|
|
make distclean || rm -f config.cache
|
|
fi
|
|
|
|
# Configure the demonstration.
|
|
echo "= Configuring in ../demo (prefix=$prefix)"
|
|
$srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1
|
|
|
|
# Do the actual build.
|
|
echo "= Running make in ../demo"
|
|
make || exit 1
|
|
|
|
# Try running the program.
|
|
echo "= Executing uninstalled programs"
|
|
if ./hell.static | grep 'GNU Hell'; then :
|
|
else
|
|
echo "$0: cannot execute ./hell.static" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
if ./hell | grep 'GNU Hell'; then :
|
|
else
|
|
echo "$0: cannot execute ./hell" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "= Running make install in ../demo"
|
|
make install || exit 1
|
|
|
|
echo "= Executing installed programs"
|
|
if $prefix/bin/hell.static | grep 'GNU Hell'; then :
|
|
else
|
|
echo "$0: cannot execute $prefix/bin/hell.static" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
if $prefix/bin/hell | grep 'GNU Hell'; then :
|
|
else
|
|
echo "$0: cannot execute $prefix/bin/hell" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "= Running make uninstall in ../demo"
|
|
make uninstall || exit 1
|
|
|
|
# See that there were no files leftover in $prefix.
|
|
leftovers=`find $prefix ! -type d -print`
|
|
if test -n "$leftovers"; then
|
|
echo "= Leftover after make uninstall:"
|
|
ls -l $leftovers
|
|
exit 1
|
|
fi
|
|
|
|
# Delete the directory tree we created.
|
|
rm -rf $prefix
|
|
|
|
|
|
# Clean up the distribution.
|
|
make distclean
|
|
|
|
exit 0
|