summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2012-10-02 19:39:35 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-02 21:07:56 +0700
commita252d59d913c9635845721575695f78ca492757e (patch)
tree8aef417d2a3b9100454446c317bd71a2b28eceb1
parentc0228e02d1ccced003b64c2c6efe13fc7cd793b5 (diff)
downloadlibtool-a252d59d913c9635845721575695f78ca492757e.tar.gz
libtool: unroll nested if into a single case statement.
* build-aux/ltmain.m4sh (func_mode_link): Unroll a hard to understad nested if statement into a more readable single case statement. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r--build-aux/ltmain.m4sh42
1 files changed, 23 insertions, 19 deletions
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh
index f4ca699b..5e879e8b 100644
--- a/build-aux/ltmain.m4sh
+++ b/build-aux/ltmain.m4sh
@@ -8206,27 +8206,28 @@ EOF
exit $EXIT_SUCCESS
fi
- if test relink = "$hardcode_action"; then
+ case $hardcode_action,$fast_install in
+ relink,*)
# Fast installation is not supported
link_command=$compile_var$compile_command$compile_rpath
relink_command=$finalize_var$finalize_command$finalize_rpath
func_warning "this platform does not like uninstalled shared libraries"
func_warning "\`$output' will be relinked during installation"
- else
- if test no != "$fast_install"; then
+ ;;
+ *,yes)
link_command=$finalize_var$compile_command$finalize_rpath
- if test yes = "$fast_install"; then
- relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
- else
- # fast_install is set to needless
- relink_command=
- fi
- else
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
link_command=$compile_var$compile_command$compile_rpath
relink_command=$finalize_var$finalize_command$finalize_rpath
- fi
- fi
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
# Replace the output file specification.
link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
@@ -8328,21 +8329,24 @@ EOF
# See if we need to build an old-fashioned archive.
for oldlib in $oldlibs; do
- if test convenience = "$build_libtool_libs"; then
+ case $build_libtool_libs in
+ convenience)
oldobjs="$libobjs_save $symfileobj"
addlibs=$convenience
build_libtool_libs=no
- else
- if test module = "$build_libtool_libs"; then
+ ;;
+ module)
oldobjs=$libobjs_save
+ addlibs=$old_convenience
build_libtool_libs=no
- else
+ ;;
+ *)
oldobjs="$old_deplibs $non_pic_objects"
$preload && test -f "$symfileobj" \
&& func_append oldobjs " $symfileobj"
- fi
- addlibs=$old_convenience
- fi
+ addlibs=$old_convenience
+ ;;
+ esac
if test -n "$addlibs"; then
gentop=$output_objdir/${outputname}x