On 05 January 2007 16:05, David Boyce wrote:

>> Option 3)
>>    $(subst -z foo,,$(args))
>>    ...but that fails if there are multiple spaces or a tab between
>> the -z and 'foo'
>> 
>> Option 4)
>>    $(subst -z foo,,$(strip $(args))
>>    ...but that replaces *all* internal whitespace in $(args) with
>> single spaces
> 
> Fortunately this build system is generating its Makefiles so we can
> be certain that command line formats are entirely regular.

  And indeed, judicious use of $(strip ....) to normalise/canonicalise the
whitespace in a variable can get round that anyway, which is helpful if you
want to allow users to supply manual overrides in environment variables (or
make variables set on the command-line invocation), since anything entered
manually might well have a stray space or two in it.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to