help-make
[Top][All Lists]
Advanced

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

eval and shell


From: Doug Konrad
Subject: eval and shell
Date: Fri, 17 Jan 2014 18:45:32 +0000

I am having difficulty using eval and shell together. Here is my makefile:

     define aaa
     $(1)_VAR1 = World
     $(1)_VAR2 = $(shell echo Hello $($(1)_VAR1))
     endef

     $(eval $(call aaa,DEMO))

     $(info $(DEMO_VAR1))
     $(info $(DEMO_VAR2))

Output:
     ~$ make
     World
     Hello
     make: *** No targets.  Stop.

I would have thought the second line of output would have been:
     Hello World

Why isn't it, and how can I fix the makefile so it is?

Thanks
Doug




reply via email to

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