]> 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:34:03 +0000 (12:34 +0000)
committerThomas Tanner <tanner@gmx.de>
Mon, 5 Apr 1999 12:34:03 +0000 (12:34 +0000)
  documented dryrun.test
* 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 e249da5a8a30ae979e12312e289305a76cc18b52..2f36a8b4e4e7daf44b2934cea332ce050647b8ec 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
+       * 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
 
index 1c959d956b0079fbaa41ef99f9dfde3227623728..3818760b5392e25abe8f2a402133b1181892cc1f 100644 (file)
@@ -3098,10 +3098,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
@@ -3142,6 +3163,25 @@ 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 mdemo-conf.test
 @itemx mdemo-exec.test
 @itemx mdemo-inst.test
@@ -3174,50 +3214,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.
+@item dryrun.test
+@pindex dryrun.test
+This test checks whether libtool's @code{--dry-run} mode works properly.
 
-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 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 79ba038d2bda2aefbd5dab18a02a37692ce7c714..16c54f8bf9c5257937475fb884c9c498a4e38053 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -2366,7 +2366,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 */
 
@@ -2379,11 +2380,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 fe683883656a9ce13ce8a4d682e657d85ae4d42c..2ee58ab460f54742a98572c37f8e326a82852589 100644 (file)
@@ -11,7 +11,7 @@ TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \
        demo-conf.test demo-make.test demo-exec.test \
        demo-inst.test demo-unst.test deplibs.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 \
        cdemo-shared.test cdemo-make.test cdemo-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