]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* doc/libtool.texi: reorder tests to reflect execution order,
authorThomas Tanner <tanner@gmx.de>
Mon, 5 Apr 1999 12:32:21 +0000 (12:32 +0000)
committerThomas Tanner <tanner@gmx.de>
Mon, 5 Apr 1999 12:32:21 +0000 (12:32 +0000)
  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

ChangeLog
doc/libtool.texi
ltmain.in
tests/Makefile.am
tests/dryrun.test [new file with mode: 0755]

index af24ba912f810badf9df0838b99eda5117798840..34a2e7c845294a1fd6441d309a73e888901c82cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 1999-04-05 Thomas Tanner  <tanner@gmx.de>
 
+       * 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
index 28b6caf029f3916a63d56c2f0417b444e2abde74..eaaaea8f094afdc611d8f2900adad353047fac18 100644 (file)
@@ -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
index a170f766b8e14827d91cd58c2992c531a68e6088..793fdfb47b79d115a3020ed79bcf997548798976 100644 (file)
--- 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`
index e4ec0d6da554befa884441a880eaafb991a8aab9..9385a45906900200ec79695572a98886951dd629 100644 (file)
@@ -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 (executable)
index 0000000..6d71f72
--- /dev/null
@@ -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