help-make
[Top][All Lists]
Advanced

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

Weird $(eval ) behavior, please help.


From: ³Â¾ü
Subject: Weird $(eval ) behavior, please help.
Date: Sun, 27 Jul 2008 14:26:12 +0800

Consider this makefile.

========================>>>

gpbr_ha = You
gpbr_lo = See

define _NlssvnUse
  val1     := $(gpbr_$1)$(gpbr_$2)
  gpbrname := $(gpbr_$1)$(gpbr_$2)
  val2 := $(gpbrname)
endef # define _NlssvnUse

tmp := $(eval $(call _NlssvnUse,ha,lo))

all:
        @echo "val1=$(val1)"
        @echo "gpbrname=$(gpbrname)"
        @echo "val2=$(val2)"

========================<<<

The output is:

val1=YouSee
gpbrname=YouSee
val2=

But why val2 gets null value? I just want to use $(gpbrname) in the define 
section to represent "YouSee", what's wrong with it?

I'm using make 3.81, both on Windows & Linux.

Thank you in advance, my GNU make guru.




reply via email to

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