[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trouble with $(wildcard)
From: |
Steve James |
Subject: |
trouble with $(wildcard) |
Date: |
Thu, 4 Oct 2001 15:34:41 -0700 |
Given this makefile:
all: setup
@echo wildcard value is $(wildcard xxx)
setup:
@mkdir -p xxx
I find that the $(wildcard xxx) evals to nothing if directory "xxx" does not
exist before invoking make. This surprises me. When are the variables in a
target's rules expanded, before making prerequisites or after? I would have
assumed after.
% mkdir xxx
% make -f x.mk
wildcard value is xxx
% rmdir xxx
% make -f x.mk
wildcard value is
% make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
- Steve
- trouble with $(wildcard),
Steve James <=