help-make
[Top][All Lists]
Advanced

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

Re: How to take union or intersection of two variables?


From: David Boyce
Subject: Re: How to take union or intersection of two variables?
Date: Thu, 31 Dec 2009 12:51:46 -0500

On Thu, Dec 31, 2009 at 12:11 PM, Peng Yu <address@hidden> wrote:
> On Thu, Dec 31, 2009 at 10:51 AM, David Boyce <address@hidden> wrote:
>> On Thu, Dec 31, 2009 at 10:14 AM, Peng Yu <address@hidden> wrote:
>>> On Wed, Dec 30, 2009 at 5:50 PM, Sam Ravnborg <address@hidden> wrote:
>>>> union = $(sort $(A) $(B))
>>>> intersection = $(filter $(A), $(B))
>>>>
>>>> I did not test this but I think this works.
>>>
>>> 'union' works, but 'intersection' should be
>>>
>>> intersection= $(filter $(A), $(B))
>>
>> Umm ... assuming there are no non-printing characters in use, this is
>> absolutely identical to what Sam posted.
>
> There are no non-printing characters in A and B. According to the
> following example, ',' is required in filter, right?
>
> $ make
> Makefile:8: *** insufficient number of arguments (1) to function
> `filter'.  Stop.
> $ cat Makefile
> .PHONY: all
>
> A= a a b b c
> B= b c d
>
> union= $(sort $(A) $(B))
> #intersection= $(filter $(A), $(B))
> intersection= $(filter $(A) $(B))
>
> intersection:
>        echo $(intersection)
>
> union:
>        echo $(union)
>

I'm simply pointing out that the correction you posted to Sam's
suggestion was literally identical to that suggestion, leaving no
clear conclusion. Perhaps you lost track of the comma in his version?

-David Boyce




reply via email to

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