libtool-patches
[Top][All Lists]
Advanced

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

Re: shell portability: don't use `set --'


From: Gary V. Vaughan
Subject: Re: shell portability: don't use `set --'
Date: Fri, 24 Dec 2004 14:28:34 +0000
User-agent: Mozilla Thunderbird 0.9 (Macintosh/20041103)

Ralf Wildenhues wrote:
I haven't seen a shell fail explicitly on this.  Can someone assert
whether this (easy) workaround is still necessary for shells in use?

If so, OK to apply to HEAD and branch-2-0?

        * Makefile.am, bootstrap, clcommit.m4sh, libtoolize.m4sh,
        config/ltmain.m4sh: Replace `set --' with `set x [...]; shift'
        for portability.

Actually, it is probably my fault for having let the -- idiom creep into
libtool.  Up until 1.5 `set dummy ...' was used consistently throughout.

I think we should continue in the same vein.  So, yes, but using dummy
instead of x.  While we're at it, adding something akin to the following
to sh.test should stop us (me!) accidentally doing it again:

# Check for using set -- instead of set dummy
if $EGREP -n -e 'set[   ]+--[   ]+' $scripts; then
  echo "use \`set dummy ...' instead of \`set -- ...'"
  status=$EXIT_FAILURE
fi

Cheers,
        Gary.
--
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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