diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-04-12 12:28:03 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2001-04-12 12:28:03 +0000 |
commit | 75b9074c18f39d280b49b177a65409f9d0edb602 (patch) | |
tree | c3b5c823f6ca384bbc3ed595eb3c55af28bf22fc /ltmain.sh | |
parent | Makefile.am: Make a libtool convenience library. (diff) | |
download | gcc-75b9074c18f39d280b49b177a65409f9d0edb602.tar.gz gcc-75b9074c18f39d280b49b177a65409f9d0edb602.tar.bz2 gcc-75b9074c18f39d280b49b177a65409f9d0edb602.tar.xz |
ltconfig, [...]: Upgraded to libtool 1.4a 1.641.2.226.
* ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.226.
From-SVN: r41299
Diffstat (limited to 'ltmain.sh')
-rw-r--r-- | ltmain.sh | 251 |
1 files changed, 201 insertions, 50 deletions
@@ -56,7 +56,7 @@ modename="$progname" | |||
56 | PROGRAM=ltmain.sh | 56 | PROGRAM=ltmain.sh |
57 | PACKAGE=libtool | 57 | PACKAGE=libtool |
58 | VERSION=1.4a | 58 | VERSION=1.4a |
59 | TIMESTAMP=" (1.641.2.198 2001/03/20 05:47:28)" | 59 | TIMESTAMP=" (1.641.2.226 2001/04/12 02:39:36)" |
60 | 60 | ||
61 | default_mode= | 61 | default_mode= |
62 | help="Try \`$progname --help' for more information." | 62 | help="Try \`$progname --help' for more information." |
@@ -136,13 +136,21 @@ do | |||
136 | ;; | 136 | ;; |
137 | esac | 137 | esac |
138 | 138 | ||
139 | if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then | 139 | case $tagname in |
140 | taglist="$taglist $tagname" | 140 | CC) |
141 | # Evaluate the configuration. | 141 | # Don't test for the "default" C tag, as we know, it's there, but |
142 | eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" | 142 | # not specially marked. |
143 | else | 143 | ;; |
144 | echo "$progname: ignoring unknown tag $tagname" 1>&2 | 144 | *) |
145 | fi | 145 | if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then |
146 | taglist="$taglist $tagname" | ||
147 | # Evaluate the configuration. | ||
148 | eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`" | ||
149 | else | ||
150 | echo "$progname: ignoring unknown tag $tagname" 1>&2 | ||
151 | fi | ||
152 | ;; | ||
153 | esac | ||
146 | ;; | 154 | ;; |
147 | *) | 155 | *) |
148 | eval "$prev=\$arg" | 156 | eval "$prev=\$arg" |
@@ -1205,9 +1213,10 @@ EOF | |||
1205 | # These systems don't actually have c library (as such) | 1213 | # These systems don't actually have c library (as such) |
1206 | continue | 1214 | continue |
1207 | ;; | 1215 | ;; |
1208 | *-*-rhapsody* | *-*-darwin*) | 1216 | *-*-rhapsody* | *-*-darwin1.[012]) |
1209 | # Darwin C library is in the System framework | 1217 | # Rhapsody C library is in the System framework |
1210 | deplibs="$deplibs -framework System" | 1218 | deplibs="$deplibs -framework System" |
1219 | continue | ||
1211 | ;; | 1220 | ;; |
1212 | esac | 1221 | esac |
1213 | elif test "$arg" = "-lm"; then | 1222 | elif test "$arg" = "-lm"; then |
@@ -1216,9 +1225,10 @@ EOF | |||
1216 | # These systems don't actually have math library (as such) | 1225 | # These systems don't actually have math library (as such) |
1217 | continue | 1226 | continue |
1218 | ;; | 1227 | ;; |
1219 | *-*-rhapsody* | *-*-darwin*) | 1228 | *-*-rhapsody* | *-*-darwin1.[012]) |
1220 | # Darwin math library is in the System framework | 1229 | # Rhapsody math library is in the System framework |
1221 | deplibs="$deplibs -framework System" | 1230 | deplibs="$deplibs -framework System" |
1231 | continue | ||
1222 | ;; | 1232 | ;; |
1223 | esac | 1233 | esac |
1224 | fi | 1234 | fi |
@@ -1245,10 +1255,6 @@ EOF | |||
1245 | $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 | 1255 | $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 |
1246 | fast_install=no | 1256 | fast_install=no |
1247 | ;; | 1257 | ;; |
1248 | *-*-rhapsody* | *-*-darwin*) | ||
1249 | # Darwin C library is in the System framework | ||
1250 | deplibs="$deplibs -framework System" | ||
1251 | ;; | ||
1252 | *) | 1258 | *) |
1253 | no_install=yes | 1259 | no_install=yes |
1254 | ;; | 1260 | ;; |
@@ -1632,6 +1638,18 @@ EOF | |||
1632 | 1638 | ||
1633 | if test $linkmode = lib; then | 1639 | if test $linkmode = lib; then |
1634 | libs="$predeps $libs $compiler_lib_search_path $postdeps" | 1640 | libs="$predeps $libs $compiler_lib_search_path $postdeps" |
1641 | |||
1642 | # Compute libraries that are listed more than once in $predeps | ||
1643 | # $postdeps and mark them as special (i.e., whose duplicates are | ||
1644 | # not to be eliminated). | ||
1645 | pre_post_deps= | ||
1646 | for pre_post_dep in $predeps $postdeps; do | ||
1647 | case "$pre_post_deps " in | ||
1648 | *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; | ||
1649 | esac | ||
1650 | pre_post_deps="$pre_post_deps $pre_post_dep" | ||
1651 | done | ||
1652 | pre_post_deps= | ||
1635 | fi | 1653 | fi |
1636 | 1654 | ||
1637 | deplibs= | 1655 | deplibs= |
@@ -2081,13 +2099,25 @@ EOF | |||
2081 | realname="$2" | 2099 | realname="$2" |
2082 | shift; shift | 2100 | shift; shift |
2083 | libname=`eval \\$echo \"$libname_spec\"` | 2101 | libname=`eval \\$echo \"$libname_spec\"` |
2084 | if test -n "$soname_spec"; then | 2102 | # use dlname if we got it. it's perfectly good, no? |
2103 | if test -n "$dlname"; then | ||
2104 | soname="$dlname" | ||
2105 | elif test -n "$soname_spec"; then | ||
2106 | # bleh windows | ||
2107 | case $host in | ||
2108 | *cygwin*) | ||
2109 | major=`expr $current - $age` | ||
2110 | versuffix="-$major" | ||
2111 | ;; | ||
2112 | esac | ||
2085 | eval soname=\"$soname_spec\" | 2113 | eval soname=\"$soname_spec\" |
2086 | else | 2114 | else |
2087 | soname="$realname" | 2115 | soname="$realname" |
2088 | fi | 2116 | fi |
2089 | 2117 | ||
2090 | # Make a new name for the extract_expsyms_cmds to use | 2118 | # Make a new name for the extract_expsyms_cmds to use |
2119 | soroot="$soname" | ||
2120 | soname=`echo $soroot | sed -e 's/^.*\///'` | ||
2091 | newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" | 2121 | newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" |
2092 | 2122 | ||
2093 | # If the library has no export list, then create one now | 2123 | # If the library has no export list, then create one now |
@@ -2350,25 +2380,44 @@ EOF | |||
2350 | vars="compile_deplibs finalize_deplibs" | 2380 | vars="compile_deplibs finalize_deplibs" |
2351 | fi | 2381 | fi |
2352 | for var in $vars dependency_libs; do | 2382 | for var in $vars dependency_libs; do |
2353 | # Make sure that $var contains only unique libraries | 2383 | # Add libraries to $var in reverse order |
2354 | # and add them in reverse order | ||
2355 | eval tmp_libs=\"\$$var\" | 2384 | eval tmp_libs=\"\$$var\" |
2356 | new_libs= | 2385 | new_libs= |
2357 | for deplib in $tmp_libs; do | 2386 | for deplib in $tmp_libs; do |
2387 | # FIXME: Pedantically, this is the right thing to do, so | ||
2388 | # that some nasty dependency loop isn't accidentally | ||
2389 | # broken: | ||
2390 | #new_libs="$deplib $new_libs" | ||
2391 | # Pragmatically, this seems to cause very few problems in | ||
2392 | # practice: | ||
2358 | case $deplib in | 2393 | case $deplib in |
2359 | -L*) new_libs="$deplib $new_libs" ;; | 2394 | -L*) new_libs="$deplib $new_libs" ;; |
2360 | *) | 2395 | *) |
2361 | case " $specialdeplibs " in | 2396 | # And here is the reason: when a library appears more |
2362 | *" $deplib "*) new_libs="$deplib $new_libs" ;; | 2397 | # than once as an explicit dependence of a library, or |
2363 | *) | 2398 | # is implicitly linked in more than once by the |
2364 | case " $new_libs " in | 2399 | # compiler, it is considered special, and multiple |
2365 | *" $deplib "*) ;; | 2400 | # occurrences thereof are not removed. Compare this |
2366 | *) new_libs="$deplib $new_libs" ;; | 2401 | # with having the same library being listed as a |
2367 | esac | 2402 | # dependency of multiple other libraries: in this case, |
2368 | ;; | 2403 | # we know (pedantically, we assume) the library does not |
2369 | esac | 2404 | # need to be listed more than once, so we keep only the |
2370 | ;; | 2405 | # last copy. This is not always right, but it is rare |
2371 | esac | 2406 | # enough that we require users that really mean to play |
2407 | # such unportable linking tricks to link the library | ||
2408 | # using -Wl,-lname, so that libtool does not consider it | ||
2409 | # for duplicate removal. | ||
2410 | case " $specialdeplibs " in | ||
2411 | *" $deplib "*) new_libs="$deplib $new_libs" ;; | ||
2412 | *) | ||
2413 | case " $new_libs " in | ||
2414 | *" $deplib "*) ;; | ||
2415 | *) new_libs="$deplib $new_libs" ;; | ||
2416 | esac | ||
2417 | ;; | ||
2418 | esac | ||
2419 | ;; | ||
2420 | esac | ||
2372 | done | 2421 | done |
2373 | tmp_libs= | 2422 | tmp_libs= |
2374 | for deplib in $new_libs; do | 2423 | for deplib in $new_libs; do |
@@ -2510,7 +2559,7 @@ EOF | |||
2510 | 2559 | ||
2511 | # Check that each of the things are valid numbers. | 2560 | # Check that each of the things are valid numbers. |
2512 | case $current in | 2561 | case $current in |
2513 | 0 | [1-9] | [1-9][0-9]*) ;; | 2562 | 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; |
2514 | *) | 2563 | *) |
2515 | $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 | 2564 | $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 |
2516 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 2565 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
@@ -2519,7 +2568,7 @@ EOF | |||
2519 | esac | 2568 | esac |
2520 | 2569 | ||
2521 | case $revision in | 2570 | case $revision in |
2522 | 0 | [1-9] | [1-9][0-9]*) ;; | 2571 | 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; |
2523 | *) | 2572 | *) |
2524 | $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 | 2573 | $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 |
2525 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 2574 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
@@ -2528,7 +2577,7 @@ EOF | |||
2528 | esac | 2577 | esac |
2529 | 2578 | ||
2530 | case $age in | 2579 | case $age in |
2531 | 0 | [1-9] | [1-9][0-9]*) ;; | 2580 | 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; |
2532 | *) | 2581 | *) |
2533 | $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 | 2582 | $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 |
2534 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | 2583 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 |
@@ -2549,6 +2598,26 @@ EOF | |||
2549 | case $version_type in | 2598 | case $version_type in |
2550 | none) ;; | 2599 | none) ;; |
2551 | 2600 | ||
2601 | darwin) | ||
2602 | # Like Linux, but with the current version available in | ||
2603 | # verstring for coding it into the library header | ||
2604 | major=.`expr $current - $age` | ||
2605 | versuffix="$major.$age.$revision" | ||
2606 | # Darwin ld doesn't like 0 for these options... | ||
2607 | minor_current=`expr $current + 1` | ||
2608 | verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" | ||
2609 | ;; | ||
2610 | |||
2611 | freebsd-aout) | ||
2612 | major=".$current" | ||
2613 | versuffix=".$current.$revision"; | ||
2614 | ;; | ||
2615 | |||
2616 | freebsd-elf) | ||
2617 | major=".$current" | ||
2618 | versuffix=".$current"; | ||
2619 | ;; | ||
2620 | |||
2552 | irix) | 2621 | irix) |
2553 | major=`expr $current - $age + 1` | 2622 | major=`expr $current - $age + 1` |
2554 | verstring="sgi$major.$revision" | 2623 | verstring="sgi$major.$revision" |
@@ -2593,16 +2662,6 @@ EOF | |||
2593 | versuffix=".$current.$revision" | 2662 | versuffix=".$current.$revision" |
2594 | ;; | 2663 | ;; |
2595 | 2664 | ||
2596 | freebsd-aout) | ||
2597 | major=".$current" | ||
2598 | versuffix=".$current.$revision"; | ||
2599 | ;; | ||
2600 | |||
2601 | freebsd-elf) | ||
2602 | major=".$current" | ||
2603 | versuffix=".$current"; | ||
2604 | ;; | ||
2605 | |||
2606 | windows) | 2665 | windows) |
2607 | # Use '-' rather than '.', since we only want one | 2666 | # Use '-' rather than '.', since we only want one |
2608 | # extension on DOS 8.3 filesystems. | 2667 | # extension on DOS 8.3 filesystems. |
@@ -2725,6 +2784,10 @@ EOF | |||
2725 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) | 2784 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) |
2726 | # these systems don't actually have a c library (as such)! | 2785 | # these systems don't actually have a c library (as such)! |
2727 | ;; | 2786 | ;; |
2787 | *-*-rhapsody* | *-*-darwin1.[012]) | ||
2788 | # Rhapsody C library is in the System framework | ||
2789 | deplibs="$deplibs -framework System" | ||
2790 | ;; | ||
2728 | *) | 2791 | *) |
2729 | # Add libc to deplibs on all other systems if necessary. | 2792 | # Add libc to deplibs on all other systems if necessary. |
2730 | if test $build_libtool_need_lc = "yes"; then | 2793 | if test $build_libtool_need_lc = "yes"; then |
@@ -2884,6 +2947,40 @@ EOF | |||
2884 | fi | 2947 | fi |
2885 | done # Gone through all deplibs. | 2948 | done # Gone through all deplibs. |
2886 | ;; | 2949 | ;; |
2950 | match_pattern*) | ||
2951 | set dummy $deplibs_check_method | ||
2952 | match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` | ||
2953 | for a_deplib in $deplibs; do | ||
2954 | name="`expr $a_deplib : '-l\(.*\)'`" | ||
2955 | # If $name is empty we are operating on a -L argument. | ||
2956 | if test "$name" != "" -a "$name" != "0"; then | ||
2957 | libname=`eval \\$echo \"$libname_spec\"` | ||
2958 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | ||
2959 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | ||
2960 | for potent_lib in $potential_libs; do | ||
2961 | if eval echo \"$potent_lib\" 2>/dev/null \ | ||
2962 | | sed 10q \ | ||
2963 | | egrep "$match_pattern_regex" > /dev/null; then | ||
2964 | newdeplibs="$newdeplibs $a_deplib" | ||
2965 | a_deplib="" | ||
2966 | break 2 | ||
2967 | fi | ||
2968 | done | ||
2969 | done | ||
2970 | if test -n "$a_deplib" ; then | ||
2971 | droppeddeps=yes | ||
2972 | echo | ||
2973 | echo "*** Warning: This library needs some functionality provided by $a_deplib." | ||
2974 | echo "*** I have the capability to make that library automatically link in when" | ||
2975 | echo "*** you link to this library. But I can only do this if you have a" | ||
2976 | echo "*** shared version of the library, which you do not appear to have." | ||
2977 | fi | ||
2978 | else | ||
2979 | # Add a -L argument. | ||
2980 | newdeplibs="$newdeplibs $a_deplib" | ||
2981 | fi | ||
2982 | done # Gone through all deplibs. | ||
2983 | ;; | ||
2887 | none | unknown | *) | 2984 | none | unknown | *) |
2888 | newdeplibs="" | 2985 | newdeplibs="" |
2889 | if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ | 2986 | if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ |
@@ -3025,6 +3122,9 @@ EOF | |||
3025 | else | 3122 | else |
3026 | soname="$realname" | 3123 | soname="$realname" |
3027 | fi | 3124 | fi |
3125 | if test x$dlname = x; then | ||
3126 | dlname=$soname | ||
3127 | fi | ||
3028 | 3128 | ||
3029 | lib="$output_objdir/$realname" | 3129 | lib="$output_objdir/$realname" |
3030 | for link | 3130 | for link |
@@ -3434,6 +3534,9 @@ EOF | |||
3434 | ;; | 3534 | ;; |
3435 | 3535 | ||
3436 | prog) | 3536 | prog) |
3537 | case $host in | ||
3538 | *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; | ||
3539 | esac | ||
3437 | if test -n "$vinfo"; then | 3540 | if test -n "$vinfo"; then |
3438 | $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 | 3541 | $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 |
3439 | fi | 3542 | fi |
@@ -3877,6 +3980,11 @@ static const void *lt_preloaded_setup() { | |||
3877 | case $output in | 3980 | case $output in |
3878 | *.exe) output=`echo $output|sed 's,.exe$,,'` ;; | 3981 | *.exe) output=`echo $output|sed 's,.exe$,,'` ;; |
3879 | esac | 3982 | esac |
3983 | # test for cygwin because mv fails w/o .exe extensions | ||
3984 | case $host in | ||
3985 | *cygwin*) exeext=.exe ;; | ||
3986 | *) exeext= ;; | ||
3987 | esac | ||
3880 | $rm $output | 3988 | $rm $output |
3881 | trap "$rm $output; exit 1" 1 2 15 | 3989 | trap "$rm $output; exit 1" 1 2 15 |
3882 | 3990 | ||
@@ -3955,7 +4063,7 @@ else | |||
3955 | 4063 | ||
3956 | if test "$fast_install" = yes; then | 4064 | if test "$fast_install" = yes; then |
3957 | echo >> $output "\ | 4065 | echo >> $output "\ |
3958 | program=lt-'$outputname' | 4066 | program=lt-'$outputname'$exeext |
3959 | progdir=\"\$thisdir/$objdir\" | 4067 | progdir=\"\$thisdir/$objdir\" |
3960 | 4068 | ||
3961 | if test ! -f \"\$progdir/\$program\" || \\ | 4069 | if test ! -f \"\$progdir/\$program\" || \\ |
@@ -4263,6 +4371,11 @@ fi\ | |||
4263 | dlprefiles="$newdlprefiles" | 4371 | dlprefiles="$newdlprefiles" |
4264 | fi | 4372 | fi |
4265 | $rm $output | 4373 | $rm $output |
4374 | # place dlname in correct position for cygwin | ||
4375 | tdlname=$dlname | ||
4376 | case $host,$output,$installed,$module,$dlname in | ||
4377 | *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; | ||
4378 | esac | ||
4266 | $echo > $output "\ | 4379 | $echo > $output "\ |
4267 | # $outputname - a libtool library file | 4380 | # $outputname - a libtool library file |
4268 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | 4381 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP |
@@ -4271,7 +4384,7 @@ fi\ | |||
4271 | # It is necessary for linking the library. | 4384 | # It is necessary for linking the library. |
4272 | 4385 | ||
4273 | # The name that we can dlopen(3). | 4386 | # The name that we can dlopen(3). |
4274 | dlname='$dlname' | 4387 | dlname='$tdlname' |
4275 | 4388 | ||
4276 | # Names of this library. | 4389 | # Names of this library. |
4277 | library_names='$library_names' | 4390 | library_names='$library_names' |
@@ -4695,6 +4808,25 @@ relink_command=\"$relink_command\"" | |||
4695 | fi | 4808 | fi |
4696 | fi | 4809 | fi |
4697 | 4810 | ||
4811 | |||
4812 | # remove .exe since cygwin /usr/bin/install will append another | ||
4813 | # one anyways | ||
4814 | case $install_prog,$host in | ||
4815 | */usr/bin/install*,*cygwin*) | ||
4816 | case $file:$destfile in | ||
4817 | *.exe:*.exe) | ||
4818 | # this is ok | ||
4819 | ;; | ||
4820 | *.exe:*) | ||
4821 | destfile=$destfile.exe | ||
4822 | ;; | ||
4823 | *:*.exe) | ||
4824 | destfile=`echo $destfile | sed -e 's,.exe$,,'` | ||
4825 | ;; | ||
4826 | esac | ||
4827 | ;; | ||
4828 | esac | ||
4829 | |||
4698 | $show "$install_prog$stripme $file $destfile" | 4830 | $show "$install_prog$stripme $file $destfile" |
4699 | $run eval "$install_prog\$stripme \$file \$destfile" || exit $? | 4831 | $run eval "$install_prog\$stripme \$file \$destfile" || exit $? |
4700 | test -n "$outputname" && ${rm}r "$tmpdir" | 4832 | test -n "$outputname" && ${rm}r "$tmpdir" |
@@ -4786,7 +4918,7 @@ relink_command=\"$relink_command\"" | |||
4786 | echo | 4918 | echo |
4787 | echo "If you ever happen to want to link against installed libraries" | 4919 | echo "If you ever happen to want to link against installed libraries" |
4788 | echo "in a given directory, LIBDIR, you must either use libtool, and" | 4920 | echo "in a given directory, LIBDIR, you must either use libtool, and" |
4789 | echo "specify the full pathname of the library, or use \`-LLIBDIR'" | 4921 | echo "specify the full pathname of the library, or use the \`-LLIBDIR'" |
4790 | echo "flag during linking and do at least one of the following:" | 4922 | echo "flag during linking and do at least one of the following:" |
4791 | if test -n "$shlibpath_var"; then | 4923 | if test -n "$shlibpath_var"; then |
4792 | echo " - add LIBDIR to the \`$shlibpath_var' environment variable" | 4924 | echo " - add LIBDIR to the \`$shlibpath_var' environment variable" |
@@ -4962,6 +5094,8 @@ relink_command=\"$relink_command\"" | |||
4962 | modename="$modename: $mode" | 5094 | modename="$modename: $mode" |
4963 | rm="$nonopt" | 5095 | rm="$nonopt" |
4964 | files= | 5096 | files= |
5097 | rmforce= | ||
5098 | exit_status=0 | ||
4965 | 5099 | ||
4966 | # This variable tells wrapper scripts just to set variables rather | 5100 | # This variable tells wrapper scripts just to set variables rather |
4967 | # than running their programs. | 5101 | # than running their programs. |
@@ -4970,6 +5104,7 @@ relink_command=\"$relink_command\"" | |||
4970 | for arg | 5104 | for arg |
4971 | do | 5105 | do |
4972 | case $arg in | 5106 | case $arg in |
5107 | -f) rm="$rm $arg"; rmforce=yes ;; | ||
4973 | -*) rm="$rm $arg" ;; | 5108 | -*) rm="$rm $arg" ;; |
4974 | *) files="$files $arg" ;; | 5109 | *) files="$files $arg" ;; |
4975 | esac | 5110 | esac |
@@ -5001,6 +5136,16 @@ relink_command=\"$relink_command\"" | |||
5001 | *) rmdirs="$rmdirs $objdir" ;; | 5136 | *) rmdirs="$rmdirs $objdir" ;; |
5002 | esac | 5137 | esac |
5003 | fi | 5138 | fi |
5139 | |||
5140 | # Don't error if the file doesn't exist and rm -f was used. | ||
5141 | if test -L "$file" >/dev/null 2>&1 || test -f "$file"; then | ||
5142 | : | ||
5143 | elif test -d "$file"; then | ||
5144 | exit_status=1 | ||
5145 | continue | ||
5146 | elif test "$rmforce" = yes; then | ||
5147 | continue | ||
5148 | fi | ||
5004 | 5149 | ||
5005 | rmfiles="$file" | 5150 | rmfiles="$file" |
5006 | 5151 | ||
@@ -5026,6 +5171,9 @@ relink_command=\"$relink_command\"" | |||
5026 | IFS="$save_ifs" | 5171 | IFS="$save_ifs" |
5027 | $show "$cmd" | 5172 | $show "$cmd" |
5028 | $run eval "$cmd" | 5173 | $run eval "$cmd" |
5174 | if test $? != 0 && test "$rmforce" != yes; then | ||
5175 | exit_status=1 | ||
5176 | fi | ||
5029 | done | 5177 | done |
5030 | IFS="$save_ifs" | 5178 | IFS="$save_ifs" |
5031 | fi | 5179 | fi |
@@ -5038,6 +5186,9 @@ relink_command=\"$relink_command\"" | |||
5038 | IFS="$save_ifs" | 5186 | IFS="$save_ifs" |
5039 | $show "$cmd" | 5187 | $show "$cmd" |
5040 | $run eval "$cmd" | 5188 | $run eval "$cmd" |
5189 | if test $? != 0 && test "$rmforce" != yes; then | ||
5190 | exit_status=1 | ||
5191 | fi | ||
5041 | done | 5192 | done |
5042 | IFS="$save_ifs" | 5193 | IFS="$save_ifs" |
5043 | fi | 5194 | fi |
@@ -5082,7 +5233,7 @@ relink_command=\"$relink_command\"" | |||
5082 | ;; | 5233 | ;; |
5083 | esac | 5234 | esac |
5084 | $show "$rm $rmfiles" | 5235 | $show "$rm $rmfiles" |
5085 | $run $rm $rmfiles | 5236 | $run $rm $rmfiles || exit_status=1 |
5086 | done | 5237 | done |
5087 | 5238 | ||
5088 | # Try to remove the ${objdir}s in the directories where we deleted files | 5239 | # Try to remove the ${objdir}s in the directories where we deleted files |
@@ -5093,7 +5244,7 @@ relink_command=\"$relink_command\"" | |||
5093 | fi | 5244 | fi |
5094 | done | 5245 | done |
5095 | 5246 | ||
5096 | exit 0 | 5247 | exit $exit_status |
5097 | ;; | 5248 | ;; |
5098 | 5249 | ||
5099 | "") | 5250 | "") |