On 10/2/06, William Deegan <[EMAIL PROTECTED]> wrote:
I want to set a make variable with the existance of a file?
(I'm not sure why you have a question mark on that...)
I have a Make variable SRC which points to the base of my source
tree. I want to see if a file $(SRC)/new_gcc exists
If it exists I would like to set a variable with a different value.
The $(wildcard) built-in function will only return the actual
filenames that exist that match the supplied patterns, even if an
argument doesn't have any globbing characters like '*' or '?'. So,
$(wildcard filename)
will expand to nothing if 'filename' doesn't exist.
Ergo, to do this:
if no new_gcc
you write this:
ifeq ($(wildcard ${SRC}/new_gcc),)
Philip Guenther
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make