libtool/tests/mdemo.test
Thomas Tanner 17915a088c * autogen: libltdl needs autoheader
* 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
1999-02-11 23:48:25 +00:00

81 lines
1.8 KiB
Bash

#! /bin/sh
# mdemo.test - try building in the ../mdemo 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 ../mdemo || mkdir ../mdemo
# Change to our build directory.
cd ../mdemo || exit 1
# Possibly clean up the distribution.
if test -f config.cache; then
echo "= Running make distclean in ../mdemo"
make distclean || rm -f config.cache
fi
# Configure the demonstration.
echo "= Configuring in ../mdemo (prefix=$prefix)"
$srcdir/../mdemo/configure --srcdir=$srcdir/../mdemo --prefix=$prefix || exit 1
# Do the actual build.
echo "= Running make in ../mdemo"
make || exit 1
# Try running the program.
echo "= Executing uninstalled programs"
if ./mdemo.static foo1.la libfoo2.la; then :
else
echo "$0: cannot execute ./mdemo.static" 1>&2
exit 1
fi
if ./mdemo foo1.la libfoo2.la; then :
else
echo "$0: cannot execute ./mdemo" 1>&2
exit 1
fi
echo "= Running make install in ../mdemo"
make install || exit 1
echo "= Executing installed programs"
if $prefix/bin/mdemo.static $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then :
else
echo "$0: cannot execute $prefix/bin/mdemo.static" 1>&2
exit 1
fi
if $prefix/bin/mdemo $prefix/lib/foo1.la $prefix/lib/libfoo2.la; then :
else
echo "$0: cannot execute $prefix/bin/mdemo" 1>&2
exit 1
fi
echo "= Running make uninstall in ../mdemo"
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