[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
removing a word matching a string?
From: |
Mike Tedder |
Subject: |
removing a word matching a string? |
Date: |
Fri, 14 Dec 2007 16:35:33 +0900 |
User-agent: |
Opera Mail/9.24 (Win32) |
Hello all,
I am using make-3.81 and have a list of source paths built using
the $(wildcard) function. I would like to pass this list to VPATH,
however it also includes a "build" subdirectory which contains the
object files. Basically the directory list looks something like
this:
/path
/path/build
/path/build/debug
/path/build/release
/path/somelib
/path/otherlib
I have tried using $(filter-out) and $(patsubst) functions, but
neither seem to be able to match just a "build" string, even using
the '%' wildcard character.
The best I have been able to come up with so far is:
$(filter-out %build, $(SOURCES))
Which removes /path/build, but does not remove /path/build/debug or
/path/debug/release. Placing the '%' wildcard after "build" seems to
have no effect at all. Explicitly specifying "/build/debug", etc. will
work, but this is obviously a hack, not to mention my directory tree
is more complicated than this.
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?
--
- breakpoint / brainstorm
- removing a word matching a string?,
Mike Tedder <=