help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why does blank have to be deferred when eval'd?


From: Mark Galeck (CW)
Subject: why does blank have to be deferred when eval'd?
Date: Sun, 18 Sep 2011 15:53:22 -0700

Hello,

I want to substitute a blank, to go from "1 2" to "1to2",  like this:


empty :=
from:= $(empty) $(empty) #blank character
#from := $(empty)nonspace$(empty)

define VAR
WORDS := 1$(from)2
$$(info $$(subst $(from),to,$$(WORDS)))
endef

$(eval $(VAR))


This does not work: it produces "1 2to".  To get the desired result, I have to 
use $$(from) instead of $(from), which should not be necessary, since from 
variable is established before eval.

Indeed, if I use the non-blank from (comment out the first from and uncomment 
the second one), then everything works as expected, I don't need $$(from)


Why??

Thank you,

Mark


You can go to this Wiki page for information about FI-SX Diagnostics:
http://cmbldc/twiki/bin/view/Platform/FiSxDiagnostics



reply via email to

[Prev in Thread] Current Thread [Next in Thread]