help-make
[Top][All Lists]
Advanced

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

Usage of "eval" inside if


From: kalyan
Subject: Usage of "eval" inside if
Date: Mon, 1 Dec 2008 22:52:28 +0530

Hi,
I am using make-3.81 and experimented with "eval" in this code:

### MAKEFILE START
VAR:=0

define change_value
VAR:=1
endef

define test_var
        if [ 1 = 0 ];then \
                DUMMY=$(eval $(change_value)); \
        fi; \
        echo $(VAR)
endef

all:
        @$(test_var)

### MAKEFILE END

I expected the output on my console to be 0 but i got 1 ?
Any hints on what might be going wrong here are appreciated.


Regards
Kalyan


reply via email to

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