[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to delay a variable's setting
From: |
Bernie Zelitch |
Subject: |
How to delay a variable's setting |
Date: |
Mon, 19 Mar 2001 17:51:03 -0500 |
If I run MS nmake on the following, the output is
1
2
***********************
all : yyy xxx
var=1
yyy :
@echo $(var)
var=2
xxx :
@echo $(var)
***********************
However, with gmake, the output is
2
2
Apparently, the two makes have two different ideas of when the variable
value should be captured.
I have a makefile technique which assembles changing, table-like variables
in an include file. Therefore, I would like a technique which is like the
nmake approach-- the value should be captured at the time is is encountered.
Any ideas would be much appreciated,
Bernie
- How to delay a variable's setting,
Bernie Zelitch <=