[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pattern matching - variable setting
From: |
Paul Smith |
Subject: |
Re: pattern matching - variable setting |
Date: |
Tue, 22 Jul 2008 09:08:40 -0400 |
On Tue, 2008-07-22 at 15:47 +0900, Aditya Kher wrote:
> case_%:CASE_DIR= /somewhere/case_%
>
> case_%:
> @echo "The case directory is ${CASE_DIR}"
pattern-specific variables don't work like that: they don't have pattern
replacement capability.
Why don't you just say:
CASE_DIR = /somewhere/case_$*
case_%:
@echo "The case directory is ${CASE_DIR}"
? The $* variable matches the pattern, and since you use "=" instead of
":=" the right-hand side is not evaluated until it's used inside the
recipe.
See the GNU make manual for details on these.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist