|
Home > Archive > Unix Programming > February 2006 > makefile. What am I doing wrong?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
makefile. What am I doing wrong?
|
|
| billy 2006-02-26, 10:16 am |
| Someone please give me a jump start!
using gmake 3.77 on HPUX
my Makefile
__BEGIN__
define xxx
echo "xxx $(1)"
endef
XXX = echo "XXX $(1)"
x :
<tab>echo "xxx"
<tab>$(call XXX,"pigs")
<tab>$(call xxx,"rats")
__END__
$ gmake
echo "xxx"
xxx
It's not executing either of the call statements. I've looked at the
man page several times and I believe I'm doing it correctly.
I'm trying to use the define as a sub routine call. Where the same
commands will be used many times just the variable will change.
I'm writing a very large makefile and will be including @ 280 other
make.include pieces to avoid recursion. I would like all commands to
be in the form of a define to maximize reuse.
| |
| Paul D. Smith 2006-02-26, 10:16 am |
| %% "billy" <bp1497@att.com> writes:
b> Someone please give me a jump start!
b> using gmake 3.77 on HPUX
b> It's not executing either of the call statements. I've looked at the
b> man page several times and I believe I'm doing it correctly.
The $(call ...) function is not supported in GNU make 3.77. You need a
newer version of GNU make (3.77 was released in July, 1998!!)
$(call ...) was introduced in GNU make 3.78. The current version is GNU
make 3.80 (although release of 3.81 is just around the corner...)
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
|
|
|
|
|