Question about simple gmake Makefile

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jose luis fernandez diaz

    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

    #2
    Re: Question about simple gmake Makefile

    jose luis fernandez diaz <jose_luis_fdez _diaz_news@yaho o.es> spoke thus:
    [color=blue]
    > Why the first Makefile is wrong ?[/color]

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




    for posting guidelines and frequently asked questions. Thank you.

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

    Comment

    Working...