help-make
[Top][All Lists]
Advanced

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

Re: How to use $(call ...)


From: Paul D. Smith
Subject: Re: How to use $(call ...)
Date: Mon, 2 Dec 2002 10:06:33 -0500

%% Andrew Hou <address@hidden> writes:

  ah> I have gmake ver 3.77 installed. The OS is SunOS.
  ah> After reading the gmake manual, I tried the following:

  ah> #!/tools/bin/gmake -f
  ah> SHELL = /usr/bin/csh

Bad, bad, bad.

csh is a completely unacceptable shell to use with make.

For one thing, due to the utterly stupid way csh handles file
descriptors you will not be able to use parallel builds with newer
versions of make, that implement the jobserver feature.

  ah> estr = Hello $(1) OK
  ah> tstr = $(call estr,world)
  ah> abc:
  ah>   @echo $(tstr)

  ah> First, the 1st line seems not work. Although the file is
  ah> executable, you hve to use gmake -f ...

It works for me:

  $ cat /tmp/1.mk
  #!/usr/bin/make -f
  all: ; @echo hi

  $ chmod 755 /tmp/1.mk

  $ /tmp/1.mk
  hi

  ah> Second, the file come out nothing. It seems $(call ) can't be
  ah> recognized. Does ver 3.77 support the function or something wrong with
  ah> my code?

$(call ...) was introduced in GNU make 3.78.  The current version of GNU
make is 3.80.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          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




reply via email to

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