ltmain.sh
changeset 26 25edca541dc9
parent 0 4ce2db4db959
child 68 6f1441b1b5a9
     1.1 --- a/ltmain.sh	Tue Dec 21 17:41:12 1999 +0000
     1.2 +++ b/ltmain.sh	Sun Dec 26 11:17:50 1999 +0000
     1.3 @@ -55,7 +55,7 @@
     1.4  PROGRAM=ltmain.sh
     1.5  PACKAGE=libtool
     1.6  VERSION=1.3c
     1.7 -TIMESTAMP=" (1.612 1999/09/30 00:26:50)"
     1.8 +TIMESTAMP=" (1.620 1999/10/07 15:40:07)"
     1.9  
    1.10  default_mode=
    1.11  help="Try \`$progname --help' for more information."
    1.12 @@ -682,6 +682,7 @@
    1.13      libobjs=
    1.14      ltlibs=
    1.15      module=no
    1.16 +    no_install=no
    1.17      objs=
    1.18      prefer_static_libs=no
    1.19      preload=no
    1.20 @@ -963,6 +964,22 @@
    1.21  	continue
    1.22  	;;
    1.23  
    1.24 +      -no-install)
    1.25 +	case "$host" in
    1.26 +	*-*-cygwin* | *-*-mingw* | *-*-os2*)
    1.27 +	  # The PATH hackery in wrapper scripts is required on Windows
    1.28 +	  # in order for the loader to find any dlls it needs.
    1.29 +	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
    1.30 +	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
    1.31 +	  fast_install=no
    1.32 +	  ;;
    1.33 +	*)
    1.34 +	  no_install=yes
    1.35 +	  ;;
    1.36 +	esac
    1.37 +	continue
    1.38 +	;;
    1.39 +
    1.40        -no-undefined)
    1.41  	allow_undefined=no
    1.42  	continue
    1.43 @@ -1240,24 +1257,23 @@
    1.44        linkmode=prog ;;
    1.45      esac
    1.46      
    1.47 -    if test $linkmode = lib || test $linkmode = prog; then
    1.48 -      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
    1.49 -      if test "X$output_objdir" = "X$output"; then
    1.50 -	output_objdir="$objdir"
    1.51 -      else
    1.52 -	output_objdir="$output_objdir/$objdir"
    1.53 +    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
    1.54 +    if test "X$output_objdir" = "X$output"; then
    1.55 +      output_objdir="$objdir"
    1.56 +    else
    1.57 +      output_objdir="$output_objdir/$objdir"
    1.58 +    fi
    1.59 +
    1.60 +    # Create the object directory.
    1.61 +    if test ! -d $output_objdir; then
    1.62 +      $show "$mkdir $output_objdir"
    1.63 +      $run $mkdir $output_objdir
    1.64 +      status=$?
    1.65 +      if test $status -ne 0 && test ! -d $output_objdir; then
    1.66 +	exit $status
    1.67        fi
    1.68 -
    1.69 -      # Create the object directory.
    1.70 -      if test ! -d $output_objdir; then
    1.71 -	$show "$mkdir $output_objdir"
    1.72 -	$run $mkdir $output_objdir
    1.73 -	status=$?
    1.74 -	if test $status -ne 0 && test ! -d $output_objdir; then
    1.75 -	  exit $status
    1.76 -	fi
    1.77 -      fi
    1.78 -    else 
    1.79 +    fi
    1.80 +    if test $linkmode != lib && test $linkmode != prog; then
    1.81        # Find libtool convenience libraries
    1.82        for deplib in $deplibs; do
    1.83  	case "$deplib" in
    1.84 @@ -3381,6 +3397,19 @@
    1.85  	fi
    1.86        fi
    1.87  
    1.88 +      if test "$no_install" = yes; then
    1.89 +	# We don't need to create a wrapper script.
    1.90 +	link_command="$compile_var$compile_command$compile_rpath"
    1.91 +	# Replace the output file specification.
    1.92 +	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
    1.93 +	# Delete the old output file.
    1.94 +	$run $rm $output
    1.95 +	# Link the executable and exit
    1.96 +	$show "$link_command"
    1.97 +	$run eval "$link_command" || exit $?
    1.98 +	exit 0
    1.99 +      fi
   1.100 +
   1.101        if test "$hardcode_action" = relink || test "$hardcode_into_libs" = yes; then
   1.102  	# Fast installation is not supported
   1.103  	link_command="$compile_var$compile_command$compile_rpath"
   1.104 @@ -3549,7 +3578,7 @@
   1.105    fi"
   1.106  	else
   1.107  	  echo >> $output "\
   1.108 -  program='$outputname$exeext'
   1.109 +  program='$outputname'
   1.110    progdir=\"\$thisdir/$objdir\"
   1.111  "
   1.112  	fi
   1.113 @@ -4754,6 +4783,8 @@
   1.114    -LLIBDIR          search LIBDIR for required installed libraries
   1.115    -lNAME            OUTPUT-FILE requires the installed library libNAME
   1.116    -module           build a library that can dlopened
   1.117 +  -no-fast-install  disable the fast-install mode
   1.118 +  -no-install       link a not-installable executable
   1.119    -no-undefined     declare that a library does not refer to external symbols
   1.120    -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
   1.121    -release RELEASE  specify package release information