libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: pointless code removal


From: Bruce Korb
Subject: PATCH: pointless code removal
Date: Sun, 03 Mar 2002 10:34:06 -0800

As far as I can tell, the removed code serves no purpose
(other than obfuscation ;-):

$ diff -u ltmain.in.ori ltmain.in.new
--- ltmain.in.ori       Sun Mar  3 10:25:57 2002
+++ ltmain.in.new       Sun Mar  3 10:27:34 2002
@@ -315,7 +315,6 @@
     modename="$modename: compile"
     # Get the compilation command and the source file.
     base_compile=
-    prev=
     lastarg=
     srcfile="$nonopt"
     suppress_output=
@@ -323,32 +322,6 @@
     user_target=no
     for arg
     do
-      case $prev in
-      "") ;;
-      xcompiler)
-       # Aesthetically quote the previous argument.
-       prev=
-       lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
-       case $arg in
-       # Double-quote args containing other shell metacharacters.
-       # Many Bourne shells cannot handle close brackets correctly
-       # in scan sets, so we specify it separately.
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-
-       # Add the previous argument to base_compile.
-       if test -z "$base_compile"; then
-         base_compile="$lastarg"
-       else
-         base_compile="$base_compile $lastarg"
-       fi
-       continue
-       ;;
-      esac
-
       # Accept any command-line options.
       case $arg in
       -o)
@@ -374,8 +347,7 @@
        continue
        ;;
 
-      -Xcompiler)
-       prev=xcompiler
+      -Xcompiler) # no-op, for compatibility
        continue
        ;;

P.S., my head hurts....

Also, anyone care to comment about the handling of "srcfile"?
Viz., what is really being accomplished that could not be
accomplished by:

  eval srcfile=\"\$$#\"

:-)
--

Bruce Korb
AG URL: http://autogen.sourceforge.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]