bug-libtool
[Top][All Lists]
Advanced

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

more portability bugs (shell syntax)


From: Peter Selinger
Subject: more portability bugs (shell syntax)
Date: Fri, 6 Aug 2010 02:07:12 -0300 (ADT)

Hi again,

this is still about libtool-2.2.10. I found more examples of
non-portable shell syntax. At least they don't work on this system:
SunOS chase-sun 5.10 Generic_118833-20 sun4u sparc SUNW,Ultra-4

In line 642 (second definition of function
func_dirname_and_basename()):

     */*) func_dirname_result="${1%/*}${2}" ;;

In line 665 (definition of func_opt_split()):

  func_opt_split_opt=${1%%=*}
  func_opt_split_arg=${1#*=}

In line 673 (definition of func_lo2o()):

    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;

Each of these substitutions are not apparently recognized by all
/bin/sh shells, at least not on the above-mentioned system. 

In the first case, there are two definitions of
func_dirname_and_basename(), so deleting the second one solves the
problem. In the second and third cases, a possible solution is to
write an equivalent sed expression. 

There are still more examples of such syntax, e.g. in func_xform(),
but in my particular context, that function didn't seem to be used so
I didn't find all such instances.

-- Peter




reply via email to

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