From: Thomas Tanner Date: Mon, 5 Apr 1999 12:32:21 +0000 (+0000) Subject: * doc/libtool.texi: reorder tests to reflect execution order, X-Git-Tag: release-1-3b~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdf5a936306d1cf44eb94033603f3771ec9172c9;p=thirdparty%2Flibtool.git * doc/libtool.texi: reorder tests to reflect execution order, documented dryrun.test and depdemo* * ltmain.in (lt_preloaded_symbols): dry-run mode bugfix * tests/dryrun.test: new test to check whether the dry-run mode works properly --- diff --git a/ChangeLog b/ChangeLog index af24ba912..34a2e7c84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-04-05 Thomas Tanner + * doc/libtool.texi: reorder tests to reflect execution order, + documented dryrun.test and depdemo* + * ltmain.in (lt_preloaded_symbols): dry-run mode bugfix + * tests/dryrun.test: new test to check whether the dry-run + mode works properly + * demo/run.test: removed the unnecessary test * demo/Makefile.am: ditto * ltmain.in: set the DLL search path on cygwin,mingw and os2 diff --git a/doc/libtool.texi b/doc/libtool.texi index 28b6caf02..eaaaea8f0 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -3096,10 +3096,31 @@ test for: @table @file -@item assign.test -@pindex assign.test -Checks whether we don't put break or continue on the same -line as an assignment in the libtool script. +@item cdemo-conf.test +@itemx cdemo-exec.test +@itemx cdemo-make.test +@itemx cdemo-static.test +@itemx cdemo-shared.test +@pindex cdemo-conf.test +@pindex cdemo-exec.test +@pindex cdemo-make.test +@pindex cdemo-static.test +@pindex cdemo-shared.test +These programs check to see that the @file{cdemo} subdirectory of the +libtool distribution can be configured and built correctly. + +The @file{cdemo} subdirectory contains a demonstration of libtool +convenience libraries, a mechanism that allows build-time static +libraries to be created, in a way that their components can be later +linked into programs or other libraries, even shared ones. + +The tests @file{cdemo-make.test} and @file{cdemo-exec.test} are executed +three times, under three different libtool configurations: +@file{cdemo-conf.test} configures @file{cdemo/libtool} to build both +static and shared libraries (the default for platforms that support +both), @file{cdemo-static.test} builds only static libraries +(@samp{--disable-shared}), and @file{cdemo-shared.test} builds only +shared libraries (@samp{--disable-static}). @item demo-conf.test @itemx demo-exec.test @@ -3140,6 +3161,59 @@ libtool uses a @code{deplibs_check_method} to prevent such cases. This tests checks whether libtool's @code{deplibs_check_method} works properly. +@item hardcode.test +@pindex hardcode.test +On all systems with shared libraries, the location of the library can be +encoded in executables that are linked against it @pxref{Linking +executables}. This test checks the conditions under which your system +linker hardcodes the library location, and guarantees that they +correspond to libtool's own notion of how your linker behaves. + +@item build-relink.test +@pindex build-relink.test +Checks whether variable @var{shlibpath_overrides_runpath} is properly +set. If the test fails and @var{VERBOSE} is set, it will indicate what +the variable should have been set to. + +@item noinst-link.test +@pindex noinst-link.test +Checks whether libtool will not try to link with a previously installed +version of a library when it should be linking with a just-built one. + +@item depdemo-conf.test +@itemx depdemo-exec.test +@itemx depdemo-inst.test +@itemx depdemo-make.test +@itemx depdemo-unst.test +@itemx depdemo-static.test +@itemx depdemo-shared.test +@itemx depdemo-nofast.test +@pindex depdemo-conf.test +@pindex depdemo-exec.test +@pindex depdemo-inst.test +@pindex depdemo-make.test +@pindex depdemo-unst.test +@pindex depdemo-static.test +@pindex depdemo-shared.test +@pindex depdemo-nofast.test +These programs check to see that the @file{depdemo} subdirectory of the +libtool distribution can be configured, built, installed, and +uninstalled correctly. + +The @file{depdemo} subdirectory contains a demonstration of inter-library +dependencies with libtool. The test programs link some interdependent +libraries. + +The tests @file{depdemo-make.test}, @file{depdemo-exec.test}, +@file{depdemo-inst.test} and @file{depdemo-unst.test} are executed +four times, under four different libtool configurations: +@file{depdemo-conf.test} configures @file{depdemo/libtool} to build both +static and shared libraries, @file{depdemo-static.test} builds only static +libraries (@samp{--disable-shared}), and @file{depdemo-shared.test} builds +only shared libraries (@samp{--disable-static}). +@file{depdemo-nofast.test} configures @file{depdemo/libtool} to +disable the fast-install mode (@samp{--enable-fast-install=no}. + @item mdemo-conf.test @itemx mdemo-exec.test @itemx mdemo-inst.test @@ -3172,50 +3246,14 @@ static and shared libraries, @file{mdemo-static.test} builds only static libraries (@samp{--disable-shared}), and @file{mdemo-shared.test} builds only shared libraries (@samp{--disable-static}). -@item cdemo-conf.test -@itemx cdemo-exec.test -@itemx cdemo-make.test -@itemx cdemo-static.test -@itemx cdemo-shared.test -@pindex cdemo-conf.test -@pindex cdemo-exec.test -@pindex cdemo-make.test -@pindex cdemo-static.test -@pindex cdemo-shared.test -These programs check to see that the @file{cdemo} subdirectory of the -libtool distribution can be configured and built correctly. - -The @file{cdemo} subdirectory contains a demonstration of libtool -convenience libraries, a mechanism that allows build-time static -libraries to be created, in a way that their components can be later -linked into programs or other libraries, even shared ones. +@item dryrun.test +@pindex dryrun.test +This test checks whether libtool's @code{--dry-run} mode works properly. -The tests @file{cdemo-make.test} and @file{cdemo-exec.test} are executed -three times, under three different libtool configurations: -@file{cdemo-conf.test} configures @file{cdemo/libtool} to build both -static and shared libraries (the default for platforms that support -both), @file{cdemo-static.test} builds only static libraries -(@samp{--disable-shared}), and @file{cdemo-shared.test} builds only -shared libraries (@samp{--disable-static}). - -@item hardcode.test -@pindex hardcode.test -On all systems with shared libraries, the location of the library can be -encoded in executables that are linked against it @pxref{Linking -executables}. This test checks the conditions under which your system -linker hardcodes the library location, and guarantees that they -correspond to libtool's own notion of how your linker behaves. - -@item build-relink.test -@pindex build-relink.test -Checks whether variable @var{shlibpath_overrides_runpath} is properly -set. If the test fails and @var{VERBOSE} is set, it will indicate what -the variable should have been set to. - -@item noinst-link.test -@pindex noinst-link.test -Checks whether libtool will not try to link with a previously installed -version of a library when it should be linking with a just-built one. +@item assign.test +@pindex assign.test +Checks whether we don't put break or continue on the same +line as an assignment in the libtool script. @item link.test @pindex link.test diff --git a/ltmain.in b/ltmain.in index a170f766b..793fdfb47 100644 --- a/ltmain.in +++ b/ltmain.in @@ -3024,7 +3024,8 @@ EOF # Parse the name list into a source file. $show "creating $objdir/$dlsyms" - $echo > "$objdir/$dlsyms" "\ + if test -z "$run"; then + $echo > "$objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ @@ -3037,11 +3038,12 @@ extern \"C\" { /* External symbol declarations for the compiler. */\ " + fi if test "$dlself" = yes; then $show "generating symbol list for \`$output'" - echo ': @PROGRAM@ ' > "$nlist" + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` diff --git a/tests/Makefile.am b/tests/Makefile.am index e4ec0d6da..9385a4590 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -15,7 +15,7 @@ TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \ depdemo-conf.test depdemo-make.test depdemo-exec.test \ depdemo-inst.test depdemo-unst.test \ mdemo-conf.test mdemo-make.test mdemo-exec.test \ - mdemo-inst.test mdemo-unst.test \ + mdemo-inst.test mdemo-unst.test dryrun.test \ demo-nofast.test demo-make.test demo-exec.test \ demo-inst.test demo-unst.test \ depdemo-nofast.test depdemo-make.test depdemo-exec.test \ diff --git a/tests/dryrun.test b/tests/dryrun.test new file mode 100755 index 000000000..6d71f72a0 --- /dev/null +++ b/tests/dryrun.test @@ -0,0 +1,84 @@ +#! /bin/sh +# dryrun.test - check whether the --dry-run mode works properly + +# Test script header. +need_prefix=yes +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 + +if test -f ../mdemo/Makefile; then : +else + echo "You must run mdemo-conf.test before running $0" 1>&2 + exit 77 +fi + +# Change to our build directory. +cd ../mdemo || exit 1 + +echo "= Running $make clean in ../mdemo" +$make clean || exit 1 + +$make main.o || exit 1 +mkdir .libs +rm -f .before .after + +echo "= Making object files in ../mdemo" +ls -l . .libs > .before +$make LIBTOOL="libtool -n" foo1.lo foo2.lo || exit 1 +ls -l . .libs > .after +diff .before .after > /dev/null || exit 1 +# Now really make them +$make foo1.lo foo2.lo || exit 1 + +echo "= Making libraries in ../mdemo" +ls -l . .libs > .before +$make LIBTOOL="libtool -n" foo1.la libfoo2.la || exit 1 +ls -l . .libs > .after +diff .before .after > /dev/null || exit 1 +# Now really make them +$make foo1.la libfoo2.la || exit 1 + +echo "= Making programs in ../mdemo" +ls -l . .libs > .before +$make LIBTOOL="libtool -n" mdemo mdemo.static || exit 1 +ls -l . .libs > .after +diff .before .after > /dev/null || exit 1 +# Now really make them +$make mdemo mdemo.static || exit 1 + +echo "= Running $make install in ../mdemo" +# Libtool does not create these directories +mkdir $prefix/bin +mkdir $prefix/lib +ls -l . .libs > .before +ls -lR $prefix >> .before +$make LIBTOOL="libtool -n" install || exit 1 +ls -l . .libs > .after +ls -lR $prefix >> .after +diff .before .after > /dev/null || exit 1 +# Now really run it +$make install || exit 1 + +echo "= Running $make uninstall in ../mdemo" +ls -l . .libs > .before +ls -lR $prefix >> .before +# Libtool does not uninstall the programs, save them +cp $prefix/bin/mdemo mdemo.sav +cp $prefix/bin/mdemo.static mdemo.static.sav +$make LIBTOOL="libtool -n" uninstall || exit 1 +# Restore them +mv mdemo.sav $prefix/bin/mdemo +mv mdemo.static.sav $prefix/bin/mdemo.static +ls -l . .libs > .after +ls -lR $prefix >> .after +diff .before .after > /dev/null || exit 1 +# Now really run it +$make uninstall || exit 1 + +rm -f .before .after + +exit 0