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: Boris Kolpackov
Subject: Re: adding functions to function.c
Date: Fri, 14 Jan 2005 22:22:44 +0000 (UTC)
User-agent: nn/6.6.5+RFC1522

Alessandro Vesely <address@hidden> writes:

> Boris Kolpackov wrote:
> > [...]
> > The idea is much simpler than that: GNU make needs scripting facility.
> > Instead of reinventing the wheel (by implementing our own) we can just
> > reuse something suitable. Guile seem like the best choice so far.
>
> Make could also load a shared object that contains user defined functions,
> a la PHP.

For most tasks it is too low-level; it is much easier to write your function
on lisp than to write it on C, build DSO, load it into make, etc. Also I
believe Guile supports loading DSOs and calling functions from them.


>The so may build on the fly, as it happens with included files.

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


If I can't load bootstrap.make I can't load rules to build DSO with
$(lastword). You would probably say that the solution would be to
have a "simple" build system (written on standard GNU make) to build
DSO. But then you might as well build custom GNU make and reexecure
your real build system using this custom make. As you can see the
difference is not qualitative. Just some thoughts.

-boris





reply via email to

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