[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to filter-out a word sequence?
From: |
Philip Guenther |
Subject: |
Re: how to filter-out a word sequence? |
Date: |
Thu, 4 Jan 2007 18:56:34 -0700 |
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
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
Philip Guenther