mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-11 15:00:08 +08:00
libtool: fold if into a compound OR statement when more readable
* build-aux/ltmain.m4sh (func_mode_link): For readability, use 'test string = "$var" || { stuff; }' in preference to 'if test string != "$var"; then stuff; fi'. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
parent
9a4cac8342
commit
8f0ee8aeeb
@ -5135,7 +5135,7 @@ func_mode_link ()
|
||||
func_dirname "$arg" "/" ""
|
||||
xdir=$func_dirname_result
|
||||
|
||||
if test none != "$pic_object"; then
|
||||
test none = "$pic_object" || {
|
||||
# Prepend the subdirectory the object is found in.
|
||||
pic_object=$xdir$pic_object
|
||||
|
||||
@ -5160,7 +5160,7 @@ func_mode_link ()
|
||||
# A PIC object.
|
||||
func_append libobjs " $pic_object"
|
||||
arg=$pic_object
|
||||
fi
|
||||
}
|
||||
|
||||
# Non-PIC object.
|
||||
if test none != "$non_pic_object"; then
|
||||
@ -6351,7 +6351,7 @@ func_mode_link ()
|
||||
done
|
||||
fi
|
||||
if test dlopen != "$pass"; then
|
||||
if test conv != "$pass"; then
|
||||
test conv = "$pass" || {
|
||||
# Make sure lib_search_path contains only unique directories.
|
||||
lib_search_path=
|
||||
for dir in $newlib_search_path; do
|
||||
@ -6361,7 +6361,7 @@ func_mode_link ()
|
||||
esac
|
||||
done
|
||||
newlib_search_path=
|
||||
fi
|
||||
}
|
||||
|
||||
if test prog,link != "$linkmode,$pass"; then
|
||||
vars=deplibs
|
||||
@ -7911,7 +7911,7 @@ EOF
|
||||
exit $EXIT_SUCCESS
|
||||
fi
|
||||
|
||||
if test yes != "$build_libtool_libs"; then
|
||||
test yes = "$build_libtool_libs" || {
|
||||
if test -n "$gentop"; then
|
||||
func_show_eval '${RM}r "$gentop"'
|
||||
fi
|
||||
@ -7921,7 +7921,7 @@ EOF
|
||||
# $show "echo timestamp > $libobj"
|
||||
# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
|
||||
exit $EXIT_SUCCESS
|
||||
fi
|
||||
}
|
||||
|
||||
if test -n "$pic_flag" || test default != "$pic_mode"; then
|
||||
# Only do commands if we really have different PIC objects.
|
||||
|
Loading…
Reference in New Issue
Block a user