Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Question about simple gmake Makefile (http://www.velocityreviews.com/forums/t282720-question-about-simple-gmake-makefile.html)

jose luis fernandez diaz 04-29-2004 02:04 PM

Question about simple gmake Makefile
 
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.

Christopher Benson-Manica 04-29-2004 03:17 PM

Re: Question about simple gmake Makefile
 
jose luis fernandez diaz <jose_luis_fdez_diaz_news@yahoo.es> spoke thus:

> Why the first Makefile is wrong ?


Your post is off-topic for comp.lang.c++. Please visit

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

for posting guidelines and frequently asked questions. Thank you.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.


All times are GMT. The time now is 01:10 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.