help-make
[Top][All Lists]
Advanced

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

Re: removing a word matching a string?


From: John Graham-Cumming
Subject: Re: removing a word matching a string?
Date: Fri, 14 Dec 2007 10:34:39 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Thunderbird/0.5 Mnenhy/0.6.0.104

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Tedder wrote:
> Another idea is to somehow have $(wildcard) not pick up a path with
> "build" in it, but from the documentation, it doesn't look like that's
> possible.  And unfortunately, even though $(findstring) finds the
> "build" string within the word, it doesn't return the actual string
> that it found it in, so I can't use that in the $(filter-out) function
> either.
> 
> Any suggestions from the make gurus out there?

How about something like this:

chomp = $(foreach a,$1,$(if $(findstring $2,$a),,$a))

The first parameter to chomp is the list to scan, the second is the
pattern to match, so you could do something like

$(call chomp,$(wildcard ...),build)

John.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHYk4uLphrp73n/hARAuarAKDe0ruEbLH4GrbYWO0qYqbEoMrzEwCgzNYN
9BXoozuQy6Io3Ws9j8MqRLE=
=t9jI
-----END PGP SIGNATURE-----




reply via email to

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