From: Gordon Matzigkeit Date: Fri, 20 Jun 1997 04:20:39 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release-1-0a~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=716dfc29da6c5e9dda5083d0e09c1c56301f17eb;p=thirdparty%2Flibtool.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index 6b36c6898..9519d863c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Thu Jun 19 14:24:06 1997 Gordon Matzigkeit * ltmain.sh.in (install): Add a missing `test' command. Reported by Joel Weber. + Miscellaneous fixes to improve robustness. From Alexandre Oliva. Sat Jun 14 21:01:03 1997 Gordon Matzigkeit diff --git a/Makefile.am b/Makefile.am index 4a5701518..90231e110 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,15 +41,15 @@ libtoolize: libtoolize.in $(top_builddir)/config.status CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status chmod +x libtoolize -# These depend on NEWS (rather then config.status) so that version numbers -# are correctly updated. +# These depend on configure.in (rather then config.status) so that version +# numbers are correctly updated. # This way, they aren't regenerated after people configure the package. -$(srcdir)/ltconfig: ltconfig.in NEWS +$(srcdir)/ltconfig: ltconfig.in configure.in CONFIG_FILES=ltconfig CONFIG_HEADERS= $(top_builddir)/config.status chmod +x ltconfig test "$(srcdir)" = . || mv ltconfig $(srcdir)/ltconfig -$(srcdir)/ltmain.sh: ltmain.sh.in NEWS +$(srcdir)/ltmain.sh: ltmain.sh.in configure.in CONFIG_FILES=ltmain.sh CONFIG_HEADERS= $(top_builddir)/config.status test "$(srcdir)" = . || mv ltmain.sh $(srcdir)/ltmain.sh diff --git a/TODO b/TODO index 9ca6954f0..dc77026e6 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,10 @@ fixed in GCC. * We could use libtool object convenience libraries that resolve symbols to be included in a libtool archive. +* Another form of convenience library, suggested by Alexandre Oliva, +is to have undocumented utility libraries, where only the shared +version is installed. + * Finish up the dlname mode, and get it integrated with DLD. We need a way for different major versions of the same .la to coexist. This also involves writing a better uninstall mode, so that nothing diff --git a/ltmain.sh.in b/ltmain.sh.in index ec4b9db77..e1856e8d5 100644 --- a/ltmain.sh.in +++ b/ltmain.sh.in @@ -63,70 +63,81 @@ show=echo show_help= # Parse our command line options once, thoroughly. -while test -n "$1" +seen_nonopt=no +seen_c_flag=no +seen_static_flag=no +while test $# -gt 0 do arg="$1" shift - case "$arg" in - -*=*) optarg=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac + if test "$seen_nonopt" != yes; then + case "$arg" in + -*=*) optarg=`echo "$arg" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - eval "$prev=\$arg" - prev= - prevopt= - continue - fi + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + eval "$prev=\$arg" + prev= + prevopt= + continue + fi - # Have we seen a non-optional argument yet? - case "$arg" in - --help) - show_help=yes - ;; + # Have we seen a non-optional argument yet? + case "$arg" in + --help) + show_help=yes + ;; - --version) - echo "$PROGRAM (GNU $PACKAGE) $VERSION" - exit 0 - ;; + --version) + echo "$PROGRAM (GNU $PACKAGE) $VERSION" + exit 0 + ;; - --dry-run | -n) - run=: - ;; + --dry-run | -n) + run=: + ;; - --features) - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - exit 0 - ;; + --features) + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + exit 0 + ;; - --finish) mode="finish" ;; + --finish) mode="finish" ;; - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; - -*) - echo "$progname: unrecognized option \`$arg'" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; + -*) + echo "$progname: unrecognized option \`$arg'" 1>&2 + echo "$help" 1>&2 + exit 1 + ;; - *) - nonopt="$arg" - break - ;; - esac + *) + nonopt="$arg" + seen_nonopt=yes + ;; + esac + else + # Just check for flags that other modes need to have knowledge of. + case "$arg" in + -c) seen_c_flag=yes ;; + -static) seen_static_flag=yes ;; + esac + fi done @@ -143,7 +154,7 @@ if test -z "$show_help"; then if test "$mode" = NONE; then case "$nonopt" in *cc) - if echo " $@ " | egrep -e "[ ]-c[ ]" > /dev/null 2>&1; then + if test "$seen_c_flag" = yes; then mode=compile else mode=link @@ -307,9 +318,9 @@ if test -z "$show_help"; then vinfo= # We need to know -static, to get the right output filenames. - case " $@ " in - *" -static "*) build_libtool_libs=no build_old_libs=yes ;; - esac + if test "$seen_static_flag" = yes; then + build_libtool_libs=no build_old_libs=yes + fi for arg do diff --git a/tests/ChangeLog b/tests/ChangeLog index 19a78b8d9..b12532704 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,11 @@ Thu Jun 19 14:31:49 1997 Gordon Matzigkeit + * demo-conf.test (CONFIG_SITE): Set to /dev/null, so that the + config.site file doesn't mess up our prefix. Reported by Joel + Weber. + + * demo-inst.test: Always run both hell.static and hell. + * demo-conf.test: Always remove the local config.cache, but run `make distclean' only if the Makefile exists. Otherwise, the demo directory is not cleaned up if a user uses their own config.cache. diff --git a/tests/demo-conf.test b/tests/demo-conf.test index 2c18e7b8e..0d0c784a0 100755 --- a/tests/demo-conf.test +++ b/tests/demo-conf.test @@ -25,6 +25,6 @@ rm -f config.cache # Configure the demonstration. echo "= Configuring in ../demo (prefix=$prefix)" -${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1 +CONFIG_SITE=/dev/null ${CONFIG_SHELL-/bin/sh} $srcdir/../demo/configure --srcdir=$srcdir/../demo --prefix=$prefix || exit 1 exit 0 diff --git a/tests/demo-inst.test b/tests/demo-inst.test index c29ccc782..ac2309d8e 100755 --- a/tests/demo-inst.test +++ b/tests/demo-inst.test @@ -24,10 +24,11 @@ echo "= Running $make install in ../demo" $make install || exit 1 echo "= Executing installed programs" +status=0 if $prefix/bin/hell.static | grep 'Welcome to GNU Hell'; then : else echo "$0: cannot execute $prefix/bin/hell.static" 1>&2 - exit 1 + status=1 fi if $prefix/bin/hell | grep 'Welcome to GNU Hell'; then : @@ -39,6 +40,6 @@ else else echo "You may need to run $0 as the superuser." fi - exit 1 + status=1 fi -exit 0 +exit $status