[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: deferred evaulation of function calls
From: |
Robert P. J. Day |
Subject: |
Re: deferred evaulation of function calls |
Date: |
Thu, 27 May 2004 13:29:23 -0400 (EDT) |
On Thu, 27 May 2004, Noel Yap wrote:
> ':=' evaluates the RHS at the time of the assignment. '=' evaluates the
> RHS at the time of actual use.
but in my original post, i did mention that my tests seemed to show no
difference. here's a sample makefile i used, in a directory with at least
a couple of .o files:
--------------------
.PHONY: main t1 t2 clean
imm := $(wildcard *.o)
def = $(wildcard *.o)
main: t1 clean t2
t1:
@echo imm = ${imm}
@echo def = ${def}
clean:
rm *.o
t2:
@echo imm = ${imm}
@echo def = ${def}
---------------------
this is invoked in a directory with some object (*.o) files. based on
what you just said, what do you expect as the output? i got the
following:
imm = a.o b.o
def = a.o b.o
rm *.o
imm = a.o b.o
def = a.o b.o ????? why?
given that "def" was a deferred assignment, i would have thought that
its second value would be the empty string since, at the "time of actual
use", as you put it, there are no .o files left.
or am i misreading something?
rday
- deferred evaulation of function calls, Robert P. J. Day, 2004/05/27
- Re: deferred evaulation of function calls, Paul D. Smith, 2004/05/27
- Re: deferred evaulation of function calls, Noel Yap, 2004/05/27
- Re: deferred evaulation of function calls,
Robert P. J. Day <=
- Re: deferred evaulation of function calls, Noel Yap, 2004/05/27
- Re: deferred evaulation of function calls, Paul D. Smith, 2004/05/27
- Re: deferred evaulation of function calls, Robert P. J. Day, 2004/05/27
- Re: deferred evaulation of function calls, Paul D. Smith, 2004/05/27
- Re: deferred evaulation of function calls, Robert P. J. Day, 2004/05/28
- Re: deferred evaulation of function calls, Paul D. Smith, 2004/05/28
- Re: deferred evaulation of function calls, Noel Yap, 2004/05/27