help-make
[Top][All Lists]
Advanced

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

Re: adding functions to function.c


From: John Graham-Cumming
Subject: Re: adding functions to function.c
Date: Fri, 14 Jan 2005 17:34:25 -0500

On Fri, 2005-01-14 at 17:22, Boris Kolpackov wrote:
> I was thinking about this too but realized that it often creates a chicken
> and egg problem: to get the function you need to build DSO, to build DSO
> you need the function. Here is a concrete example: I needed $(lastword)
> to include bootstrap file from a relative path:
> 
> include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make

Of course, you could define lastword like this:

lastword = $(word $(words $1),$1)

and then $(call) it:

include $(dir $(call lastword,$(MAKEFILE_LIST)))../build/bootstrap.make

John.
-- 
John Graham-Cumming

Home: http://www.jgc.org/
Work: http://www.electric-cloud.com/
POPFile: http://getpopfile.org/






reply via email to

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