Hi,
VAR=hello
VAR=$(subst hello,bye,$(VAR ))
print:
echo $(VAR)
sqocfms01:jdiaz :tmp>make print
Makefile:6: *** Recursive variable `VAR' references itself (eventually). Stop.
VAR=hello
VAR:=$(subst hello,bye,$(VAR ))
^
print:
echo $(VAR)
sqocfms01:jdiaz :tmp>make print
echo bye
bye
Why the first Makefile is wrong ?
Thanks,
Jose Luis.
VAR=hello
VAR=$(subst hello,bye,$(VAR ))
print:
echo $(VAR)
sqocfms01:jdiaz :tmp>make print
Makefile:6: *** Recursive variable `VAR' references itself (eventually). Stop.
VAR=hello
VAR:=$(subst hello,bye,$(VAR ))
^
print:
echo $(VAR)
sqocfms01:jdiaz :tmp>make print
echo bye
bye
Why the first Makefile is wrong ?
Thanks,
Jose Luis.
Comment