This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix quoting of program-transform-name in toplevel configure
- From: Andreas Schwab <schwab at suse dot de>
- To: Geoffrey Keating <geoffk at apple dot com>
- Cc: Phil Edwards <phil at jaj dot com>, Andreas Tobler <toa at pop dot agri dot ch>,Geoffrey Keating <gkeating at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 01 Sep 2003 22:09:27 +0200
- Subject: Re: Fix quoting of program-transform-name in toplevel configure
- References: <7AEED0AB-D3AA-11D7-97E6-0050E4BAD278@apple.com>
Geoffrey Keating <geoffk@apple.com> writes:
> On Wednesday, August 20, 2003, at 11:53 PM, Phil Edwards wrote:
>
>> On Thu, Aug 21, 2003 at 06:44:49AM +0200, Andreas Tobler wrote:
>>> Geoffrey Keating wrote:
>>> +# Export original configure arguments for use by sub-configures.
>>> These
>>> +# will be expanded once by make, and once by the shell, so they need
>>> to
>>> +# have '$' quoted for make, and then each argument quoted for the
>>> shell.
>>> +# What's more, the 'echo' below might expand backslashes.
>>> +cat <<\EOF_SED > conftestsed
>>> +s,\\,\\\\,g; s,\$,$$,g
>>> +EOF_SED
>>> +tmp="'$progname'"
>>> +for ac_arg ; do <--------------------------------
>>>
>>> Solaris native complains about unexpected ; at line 805.
>>
>> Yep. If the "no list given so assume the program args" form of 'for'
>> is to be used, it has to be
>>
>> for ac_arg
>> do
>>
>> i.e., semicolon and newline aren't equivalent.
Actually the POSIX sh grammer does not allow a semicolon here, only a
newline, thus this should be just "for arc_arg do ...".
for_clause : For name linebreak do_group
| For name linebreak in sequential_sep do_group
| For name linebreak in wordlist sequential_sep do_group
;
linebreak : newline_list
| /* empty */
;
sequential_sep : ';' linebreak
| newline_list
;
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."