]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: use false or : for $wrappers_required, and simplify
authorGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 11:08:29 +0000 (18:08 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 14:07:26 +0000 (21:07 +0700)
* build-aux/ltmain.m4sh (func_mode_link): Save a string
comparison by setting $wrappers_required to false or : and using
it directly with a ored block rather than an if statement.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
build-aux/ltmain.m4sh

index 7679d3d21150e37d18c013773a59c844f22d12a7..47b6390e4fa96906f489aac0b699a4bcb0316f7e 100644 (file)
@@ -8124,24 +8124,22 @@ EOF
        func_execute_cmds "$prelink_cmds" 'exit $?'
       fi
 
-      wrappers_required=yes
+      wrappers_required=:
       case $host in
       *cegcc* | *mingw32ce*)
         # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
-        wrappers_required=no
+        wrappers_required=false
         ;;
       *cygwin* | *mingw* )
-        if test yes != "$build_libtool_libs"; then
-          wrappers_required=no
-        fi
+        test yes = "$build_libtool_libs" || wrappers_required=false
         ;;
       *)
         if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
-          wrappers_required=no
+          wrappers_required=false
         fi
         ;;
       esac
-      if test no = "$wrappers_required"; then
+      $wrappers_required || {
        # Replace the output file specification.
        compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
        link_command=$compile_command$compile_rpath
@@ -8162,7 +8160,7 @@ EOF
        fi
 
        exit $exit_status
-      fi
+      }
 
       if test -n "$compile_shlibpath$finalize_shlibpath"; then
        compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"