On 05 January 2007 01:57, Philip Guenther wrote:
> On 1/4/07, David Boyce <[EMAIL PROTECTED]> 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....
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make