From: Alexandre Oliva Date: Tue, 6 Apr 1999 23:54:51 +0000 (+0000) Subject: * tests/dryrun.test: Use cmp instead of diff. X-Git-Tag: release-1-3~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b016a105d9a3ab20d1120f6f9e9a0e6a6027c8aa;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 7bc6656c2..91da56a41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-04-06 Alexandre Oliva + + * 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 * NEWS: improved DJGPP support diff --git a/ltmain.in b/ltmain.in index eeb0e9823..522f091f1 100644 --- 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'" diff --git a/tests/Makefile.am b/tests/Makefile.am index 2ee58ab46..dac35b836 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 diff --git a/tests/dryrun.test b/tests/dryrun.test index 6d71f72a0..c1c56943f 100755 --- a/tests/dryrun.test +++ b/tests/dryrun.test @@ -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