Eric Botcazou wrote:
>>   Is it just a bug for me to generate LIBGNAT_TARGET_PAIRS in a way that
>> has superfluous spaces (whether leading, trailing or embedded), or shall I
>> send a patch to add a $(strip) to the right-hand side of the ifeq
>> comparison?  Or perhaps we should do
>>
>> LIBGNAT_TARGET_PAIRS:=$(strip $(LIBGNAT_TARGET_PAIRS))
>>
>> right at the top-level, just after the per-target chunks, to ensure the
>> string is properly normalised before any further tests and comparisons we
>> might want to make?
> 
> That indeed seems to be a good idea (with a little comment).
> 

  Actually, the test logic is kinda backwards.  We want to know if
LIBGNAT_TARGET_PAIRS contains anything matching a certain pattern, so we
remove anything matching that pattern and then see if the string has changed
or not?  It would seem a bit more direct and to-the-point to just have used
$(filter) instead of $(filter-out) and compare against an empty string, and
that way would have been robust in the face of whitespace changes.  Maybe I'll
rewrite that test as well in the patch.

    cheers,
      DaveK

Reply via email to