help-make
[Top][All Lists]
Advanced

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

RE: how to filter-out a word sequence?


From: Dave Korn
Subject: RE: how to filter-out a word sequence?
Date: Fri, 5 Jan 2007 12:09:28 -0000

On 05 January 2007 01:57, Philip Guenther wrote:

> On 1/4/07, David Boyce <address@hidden> wrote:
> ...
>>   The problem is that occasionally a target will need one of these
>> removed as a special case. But of course using $(filter-out -z
>> foo,...) will remove *all* the -z flags, leaving the other keywords
>> hanging there alone, while quoting the string like $(filter-out "-z
>> foo",...) doesn't match anything. Does anybody know a reasonable way
>> to remove a whitespace-containing string?
> 
> Option 1)
>     don't put a space between the -z and its argument to begin with, then
>     use $(filter-out)
> 
> Option 2)
>    don't put the unwanted arguments in the general variable but rather keep
>    them in another variable for use with just those targets that need them
> 

  And another one!  Don't put the -z's in at all!  Only add them when you need
them!


LDFLAGS:=combreloc noversion defs
LDFLAGS_LESS:=$(filter-out noversion,$(LDFLAGS))

all: one two

one: $(OBJS)
        @echo $(LD) $(LDFLAGS:%=-z %) -o one

one: $(OBJS)
        @echo $(LD) $(LDFLAGS_LESS:%=-z %) -o two



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





reply via email to

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