]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/dryrun.test: Use cmp instead of diff.
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 6 Apr 1999 23:54:51 +0000 (23:54 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 6 Apr 1999 23:54:51 +0000 (23:54 +0000)
(before, after): Create them within ../tests.
(libtool): Set to `/bin/sh ./libtool' by default, but use LIBTOOL,
SHELL and top_builddir from the environment if available.  For dry
runs, use "$libtool -n".
* tests/Makefile.am (CLEANFILES): Added before and after.
* ltmain.in: Do not create links to object files in dry runs.

ChangeLog
ltmain.in
tests/Makefile.am
tests/dryrun.test

index 7bc6656c2e9b196e82359325e6032da9137ce3c9..91da56a4153b9c91b0bf5183fcf95726a137db68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+1999-04-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * tests/dryrun.test: Use cmp instead of diff.
+       (before, after): Create them within ../tests.
+       (libtool): Set to `/bin/sh ./libtool' by default, but use LIBTOOL, 
+       SHELL and top_builddir from the environment if available.  For dry 
+       runs, use "$libtool -n".
+       * tests/Makefile.am (CLEANFILES): Added before and after.
+       * ltmain.in: Do not create links to object files in dry runs.
+
 1999-04-06 Thomas Tanner  <tanner@gmx.de>
 
        * NEWS: improved DJGPP support
index eeb0e982365d7c259df63e938b2df6d6f0e60cb5..522f091f1423390efb9845a12d99ebffe0585756 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -2014,7 +2014,10 @@ EOF
        # (e.g. aix) incase we are running --disable-static
        for obj in $libobjs; do
          oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
-         test -f $oldobj || ${LN_S} $obj $oldobj
+         if test ! -f $oldobj; then
+           $show "${LN_S} $obj $oldobj"
+           $run ${LN_S} $obj $oldobj || exit $?
+         fi
        done
 
        # Use standard objects if they are pic
@@ -2366,8 +2369,7 @@ EOF
          # Parse the name list into a source file.
          $show "creating $objdir/$dlsyms"
 
-         if test -z "$run"; then
-           $echo > "$objdir/$dlsyms" "\
+         test -z "$run" && $echo > "$objdir/$dlsyms" "\
 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
 
@@ -2380,7 +2382,6 @@ extern \"C\" {
 
 /* External symbol declarations for the compiler. */\
 "
-         fi
 
          if test "$dlself" = yes; then
            $show "generating symbol list for \`$output'"
index 2ee58ab460f54742a98572c37f8e326a82852589..dac35b836ced4f42d99eff9ed36dd3f3fe1ae70b 100644 (file)
@@ -40,6 +40,8 @@ TESTS_ENVIRONMENT = CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
 
 EXTRA_DIST = defs $(TESTS)
 
+CLEANFILES = before after # created by dryrun.test
+
 # We need to remove any files that the above tests created.
 clean-local:
        -test -f ../cdemo/Makefile && cd ../cdemo && $(MAKE) distclean
index 6d71f72a052c487aabd6bb6da205be72e51a5a24..c1c56943f310cafdbafb155f34d48b0d550fff62 100755 (executable)
@@ -19,34 +19,38 @@ fi
 # Change to our build directory.
 cd ../mdemo || exit 1
 
+before=../tests/before
+after=../tests/after
+libtool=${LIBTOOL-${SHELL-/bin/sh}\ ${top_builddir-.}/libtool}
+
 echo "= Running $make clean in ../mdemo"
 $make clean || exit 1
 
 $make main.o || exit 1
 mkdir .libs
-rm -f .before .after
+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
+ls -l . .libs > $before
+$make LIBTOOL="$libtool -n" foo1.lo foo2.lo || exit 1
+ls -l . .libs > $after
+cmp $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
+ls -l . .libs > $before
+$make LIBTOOL="$libtool -n" foo1.la libfoo2.la || exit 1
+ls -l . .libs > $after
+cmp $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
+ls -l . .libs > $before
+$make LIBTOOL="$libtool -n" mdemo mdemo.static || exit 1
+ls -l . .libs > $after
+cmp $before $after > /dev/null || exit 1
 # Now really make them
 $make mdemo mdemo.static || exit 1
 
@@ -54,31 +58,31 @@ 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
+ls -l . .libs > $before
+ls -lR $prefix >> $before
+$make LIBTOOL="$libtool -n" install || exit 1
+ls -l . .libs > $after
+ls -lR $prefix >> $after
+cmp $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
+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
+$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
+ls -l . .libs > $after
+ls -lR $prefix >> $after
+cmp $before $after > /dev/null || exit 1
 # Now really run it
 $make uninstall || exit 1
 
-rm -f .before .after
+rm -f $before $after
 
 exit 0