]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
*** empty log message ***
authorGordon Matzigkeit <gord@trick.fig.org>
Thu, 20 Aug 1998 15:48:13 +0000 (15:48 +0000)
committerGordon Matzigkeit <gord@gnu.org>
Thu, 20 Aug 1998 15:48:13 +0000 (15:48 +0000)
ChangeLog
Makefile.am
NEWS
ltconfig.in
ltmain.in

index 6cbfc87840a05d8b8da7e4db6c23f1af48387ec4..fd6d6f16beaba7b48e58897781202c4bde8e10da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,28 @@
-1998-06-30  Gordon Matzigkeit  <gord@fig.org>
+1998-08-20  Gordon Matzigkeit  <gord@trick.fig.org>
+
+       * ltmain.in (install): When library_names_spec has redundancies,
+       avoid deleting the main library when installing symlinks.  From
+       Jeff Dairiki.
+       (link): Get rid of backticks in a here doc comment.
+       This causes segfaults on Solaris 2.  From Aleksandar Bakic.
+       (finish): Don't display messages
+
+       * ltconfig.in (archive_cmds): On HP-UX 9, make sure we don't try
+       to move a file to itself.  From Jeff Dairiki.
+
+1998-08-19  Gordon Matzigkeit  <gord@trick.fig.org>
+
+       * ltconfig.in: Make changes to accomodate ltmain.c.
+
+       * Makefile.am (clibtool): New target for the C version of libtool.
+
+       * ltmain.c: Experimental C version of libtool.
+
+1998-07-10  Ian Lance Taylor  <ian@cygnus.com>
+
+       * ltmain.in (install): Test against both $SHELL and /bin/sh.
+
+1998-06-30  Gordon Matzigkeit  <gord@trick.fig.org>
 
        * ltmain.in: Convenience archive support.  From Ulrich Drepper.
 
index f5ce4e98ec29b24dd8d0d6ee2eb3a45c93cb7505..050ea0d83674dc88374e35c31423cd4d57e9e1d4 100644 (file)
@@ -31,10 +31,16 @@ aclocal_DATA = $(aclocal_macros)
 # The standalone libtool script, and the libtool distributor.
 bin_SCRIPTS = libtool libtoolize
 
-libtool: ltconfig ltmain.sh
+libtool: ltmain.sh ltconfig
        CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
        LD="$(LD)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
-       $(SHELL) $(srcdir)/ltconfig --srcdir=$(srcdir) $(srcdir)/ltmain.sh
+       $(SHELL) $(srcdir)/ltconfig --srcdir=$(srcdir) --output=$@  $<
+
+# Experimental C version of libtool.
+clibtool: ltmain.c ltconfig
+       CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+       LD="$(LD)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \
+       $(SHELL) $(srcdir)/ltconfig --srcdir=$(srcdir) --output=$@ $<
 
 libtoolize: libtoolize.in $(top_builddir)/config.status
        CONFIG_FILES=libtoolize CONFIG_HEADERS= $(top_builddir)/config.status
diff --git a/NEWS b/NEWS
index b7e573640639c87a388af45b35d56cdd93e24e3a..d3fb67a7462c88be6947416427be51cccbd62bf5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
+New in 1.2c - 1998-XX-XX:
+* Arguments to ltconfig have been changed to allow creation of a
+libtool C program.
+
 New in 1.2b - 1998-07-01, Gordon Matzigkeit:
 * Libtool needs a new maintainer, since Gordon Matzigkeit has quit.
 If you think you can do the job, send mail to bug-libtool@gnu.org.
index d430c0dfff2176a6373cf45414fbc84a35ba49c3..164cb349f16a5331dc2ac5d8e20717891314e69e 100755 (executable)
@@ -146,7 +146,7 @@ do
 
   case "$option" in
   --help) cat <<EOM
-Usage: $progname [OPTION]... LTMAIN [HOST]
+Usage: $progname [OPTION]... [HOST [LTMAIN]]
 
 Generate a system-specific libtool script.
 
@@ -163,8 +163,8 @@ Generate a system-specific libtool script.
     --with-gcc             assume that the GNU C compiler will be used
     --with-gnu-ld          assume that the C compiler uses the GNU linker
 
-LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
-functionality.
+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
+that provides basic libtool functionality.
 
 HOST is the canonical host system name [default=guessed].
 EOM
@@ -278,7 +278,7 @@ else
 fi
 
 if test -z "$srcdir"; then
-  # Assume the source directory is the same one as the path to ltmain.sh.
+  # Assume the source directory is the same one as the path to LTMAIN.
   srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
   test "$srcdir" = "$ltmain" && srcdir=.
 fi
@@ -832,7 +832,7 @@ else
     ;;
 
   hpux9*)
-    archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
+    archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;test $objdir/$soname = $lib || mv $objdir/$soname $lib'
     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
     hardcode_direct=yes
     hardcode_minus_L=yes
@@ -1321,39 +1321,43 @@ echo "$ac_t$objdir" 1>&6
 # Copy echo and quote the copy, instead of the original, because it is
 # used later.
 ltecho="$echo"
+LTSHELL="$SHELL"
+
+# Only quote variables if we're using ltmain.sh.
+case "$ltmain" in
+*.sh)
+  # Now quote all the things that may contain metacharacters.
+  for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+    old_LN_S AR CC LD LN_S NM LTSHELL VERSION reload_flag reload_cmds wl \
+    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
+    whole_archive_flag_spec libname_spec library_names_spec soname_spec \
+    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
+    old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
+    allow_undefined_flag no_undefined_flag \
+    finish_cmds finish_eval global_symbol_pipe \
+    hardcode_libdir_flag_spec hardcode_libdir_separator; do
+
+    case "$var" in
+    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
+    old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
+    postinstall_cmds | postuninstall_cmds | finish_cmds)
+      # Double-quote double-evaled strings.
+      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    *)
+      eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      ;;
+    esac
+  done
 
-# Now quote all the things that may contain metacharacters.
-for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
-  old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
-  link_static_flag no_builtin_flag export_dynamic_flag_spec \
-  whole_archive_flag_spec libname_spec library_names_spec soname_spec RANLIB \
-  old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
-  old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
-  allow_undefined_flag no_undefined_flag \
-  finish_cmds finish_eval global_symbol_pipe \
-  hardcode_libdir_flag_spec hardcode_libdir_separator; do
-
-  case "$var" in
-  reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
-  old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
-  postinstall_cmds | postuninstall_cmds | finish_cmds)
-    # Double-quote double-evaled strings.
-    eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
-    ;;
-  *)
-    eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
-    ;;
-  esac
-done
-
-trap "$rm \"$ofile\"; exit 1" 1 2 15
-echo "creating $ofile"
-$rm "$ofile"
-cat <<EOF > "$ofile"
+  trap "$rm \"$ofile\"; exit 1" 1 2 15
+  echo "creating $ofile"
+  $rm "$ofile"
+  cat <<EOF > "$ofile"
 #! $SHELL
 
 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
 # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
 #
 # Copyright (C) 1996-1998 Free Software Foundation, Inc.
@@ -1386,20 +1390,44 @@ Xsed="sed -e s/^X//"
 if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
 
 ### BEGIN LIBTOOL CONFIG
+EOF
+  cfgfile="$ofile"
+  ;;
+
+*)
+  # Double-quote the variables that need it (for aesthetics).
+  for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
+    old_LN_S; do
+    eval "$var=\\\"\$var\\\""
+  done
+
+  # Just create a config file.
+  cfgfile="$ofile.cfg"
+  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+  echo "creating $cfgfile"
+  $rm "$cfgfile"
+  cat <<EOF > "$cfgfile"
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION)
+EOF
+  ;;
+esac
+
+cat <<EOF >> "$cfgfile"
 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 #
-# CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
-# LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# LD=$old_LD NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
 #   $0$ltconfig_args
 #
 # Compiler and other test output produced by $progname, useful for
 # debugging $progname, is in ./config.log if it exists.
 
 # The version of $progname that generated this script.
-LTCONFIG_VERSION="$VERSION"
+LTCONFIG_VERSION=$VERSION
 
 # Shell to use when invoking shell scripts.
-SHELL="$SHELL"
+SHELL=$LTSHELL
 
 # Whether or not to build shared libraries.
 build_libtool_libs=$enable_shared
@@ -1408,93 +1436,93 @@ build_libtool_libs=$enable_shared
 build_old_libs=$enable_static
 
 # The host system.
-host_alias="$host_alias"
-host="$host"
+host_alias=$host_alias
+host=$host
 
 # An echo program that does not interpret backslashes.
-echo="$ltecho"
+echo=$ltecho
 
 # The archiver.
-AR="$AR"
+AR=$AR
 
 # The default C compiler.
-CC="$CC"
+CC=$CC
 
 # The linker used to build libraries.
-LD="$LD"
+LD=$LD
 
 # Whether we need hard or soft links.
-LN_S="$LN_S"
+LN_S=$LN_S
 
 # A BSD-compatible nm program.
-NM="$NM"
+NM=$NM
 
 # The name of the directory that contains temporary libtool files.
-objdir="$objdir"
+objdir=$objdir
 
 # How to create reloadable object files.
-reload_flag="$reload_flag"
-reload_cmds="$reload_cmds"
+reload_flag=$reload_flag
+reload_cmds=$reload_cmds
 
 # How to pass a linker flag through the compiler.
-wl="$wl"
+wl=$wl
 
 # Additional compiler flags for building library objects.
-pic_flag="$pic_flag"
+pic_flag=$pic_flag
 
 # Compiler flag to prevent dynamic linking.
-link_static_flag="$link_static_flag"
+link_static_flag=$link_static_flag
 
 # Compiler flag to turn off builtin functions.
-no_builtin_flag="$no_builtin_flag"
+no_builtin_flag=$no_builtin_flag
 
 # Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec="$export_dynamic_flag_spec"
+export_dynamic_flag_spec=$export_dynamic_flag_spec
 
 # Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec="$whole_archive_flag_spec"
+whole_archive_flag_spec=$whole_archive_flag_spec
 
 # Library versioning type.
 version_type=$version_type
 
 # Format of library name prefix.
-libname_spec="$libname_spec"
+libname_spec=$libname_spec
 
 # List of archive names.  First name is the real one, the rest are links.
 # The last name is the one that the linker finds with -lNAME.
-library_names_spec="$library_names_spec"
+library_names_spec=$library_names_spec
 
 # The coded name of the library, if different from the real name.
-soname_spec="$soname_spec"
+soname_spec=$soname_spec
 
 # Commands used to build and install an old-style archive.
-RANLIB="$RANLIB"
-old_archive_cmds="$old_archive_cmds"
-old_postinstall_cmds="$old_postinstall_cmds"
-old_postuninstall_cmds="$old_postuninstall_cmds"
+RANLIB=$RANLIB
+old_archive_cmds=$old_archive_cmds
+old_postinstall_cmds=$old_postinstall_cmds
+old_postuninstall_cmds=$old_postuninstall_cmds
 
 # Create an old-style archive from a shared archive.
-old_archive_from_new_cmds="$old_archive_from_new_cmds"
+old_archive_from_new_cmds=$old_archive_from_new_cmds
 
 # Commands used to build and install a shared archive.
-archive_cmds="$archive_cmds"
-postinstall_cmds="$postinstall_cmds"
-postuninstall_cmds="$postuninstall_cmds"
+archive_cmds=$archive_cmds
+postinstall_cmds=$postinstall_cmds
+postuninstall_cmds=$postuninstall_cmds
 
 # Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag="$allow_undefined_flag"
+allow_undefined_flag=$allow_undefined_flag
 
 # Flag that forces no undefined symbols.
-no_undefined_flag="$no_undefined_flag"
+no_undefined_flag=$no_undefined_flag
 
 # Commands used to finish a libtool library installation in a directory.
-finish_cmds="$finish_cmds"
+finish_cmds=$finish_cmds
 
 # Same as above, but a single script fragment to be evaled but not shown.
-finish_eval="$finish_eval"
+finish_eval=$finish_eval
 
 # Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe="$global_symbol_pipe"
+global_symbol_pipe=$global_symbol_pipe
 
 # This is the shared library runtime path variable.
 runpath_var=$runpath_var
@@ -1507,10 +1535,10 @@ hardcode_action=$hardcode_action
 
 # Flag to hardcode \$libdir into a binary during linking.
 # This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
 
 # Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
+hardcode_libdir_separator=$hardcode_libdir_separator
 
 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 # resulting binary.
@@ -1525,9 +1553,13 @@ hardcode_minus_L=$hardcode_minus_L
 hardcode_shlibpath_var=$hardcode_shlibpath_var
 EOF
 
-case "$host_os" in
-aix3*)
-  cat <<\EOF >> "$ofile"
+case "$ltmain" in
+*.sh)
+  echo '### END LIBTOOL CONFIG' >> "$ofile"
+  echo >> "$ofile"
+  case "$host_os" in
+  aix3*)
+    cat <<\EOF >> "$ofile"
 
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
@@ -1537,16 +1569,20 @@ if test "${COLLECT_NAMES+set}" != set; then
   export COLLECT_NAMES
 fi
 EOF
-  ;;
-esac
+    ;;
+  esac
 
-echo '### END LIBTOOL CONFIG' >> "$ofile"
-echo >> "$ofile"
+  # Append the ltmain.sh script.
+  cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
 
-# Append the ltmain.sh script.
-cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
+  chmod +x "$ofile"
+  ;;
 
-chmod +x "$ofile"
+*)
+  # Compile the libtool program.
+  echo "FIXME: would compile $ltmain"
+  ;;
+esac
 exit 0
 
 # Local Variables:
index 6e65772245ba2ae255571cf275e7b497b8e09a6e..a70e72b3bf2afa80951d056646349d9d425dbc3e 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1528,7 +1528,7 @@ dld_preloaded_symbols[] =
 # The $output program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
 #
-# This wrapper script should never be moved out of \``pwd`'.
+# This wrapper script should never be moved out of the build directory.
 # If it is, it will not operate correctly.
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
@@ -1738,7 +1738,7 @@ libdir='$install_libdir'\
 
     # There may be an optional sh(1) argument at the beginning of
     # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL"; then
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
       # Aesthetically quote it.
       arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
       case "$arg" in
@@ -1936,21 +1936,14 @@ libdir='$install_libdir'\
           test "X$dlname" = "X$realname" && dlname=
 
           if test $# -gt 0; then
-            # Delete the old symlinks.
-            rmcmd="$rm"
-            for linkname
-            do
-              rmcmd="$rmcmd $destdir/$linkname"
-            done
-            $show "$rmcmd"
-            $run $rmcmd
-
-            # ... and create new ones.
+            # Delete the old symlinks, and create new ones.
             for linkname
             do
               test "X$dlname" = "X$linkname" && dlname=
-              $show "(cd $destdir && $LN_S $realname $linkname)"
-              $run eval "(cd $destdir && $LN_S $realname $linkname)"
+             if test "$linkname" != "$realname"; then
+               $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+               $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+             fi
             done
           fi
 
@@ -2162,6 +2155,9 @@ libdir='$install_libdir'\
       done
     fi
 
+    # Exit here if they wanted silent mode.
+    test "$show" = : && exit 0
+
     echo "----------------------------------------------------------------------"
     echo "Libraries have been installed in:"
     for libdir in $libdirs; do