This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: RFC: Use program_transform_name correctly
Daniel Jacobowitz <drow@mvista.com> writes:
> On Wed, Oct 08, 2003 at 02:17:26PM -0500, Jim Blandy wrote:
>>
>> Daniel Jacobowitz <drow@mvista.com> writes:
>> > Conveniently this is no longer an issue in the src repository (or in
>> > gcc). The toplevel configure script now guarantees that
>> > $(program_transform_name) will not be empty. So $$t it is.
>>
>> But doesn't that mean I can just say:
>>
>> sed '$(program_transform_name)'
>>
>> since Make substitution doesn't respect single quotes in shell
>> commands?
>
> I'm not sure. This is all complicated by the way that things get
> escaped if $(program_transform_name) contains a ' or a \. And sed
> scripts often do contain backslashes:
> --program-transform-name='s,(gdb),\1-6.0,'
Single quotes won't work in either case, whether you write
t='$(program_transform_name)'; sed $$t
or
sed '$(program_transform_name)'
but in the first case word splitting is performed on the sed argument.
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."