guile-user
[Top][All Lists]
Advanced

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

Embedding vs. Extending (was: Re: Using guile as an extension language f


From: Paul Smith
Subject: Embedding vs. Extending (was: Re: Using guile as an extension language for GNU make)
Date: Sun, 18 Sep 2011 13:21:08 -0400

On Sun, 2011-09-18 at 14:10 +0200, Ludovic Courts wrote:
> Ideally, when Guile support is enabled, GNU make would be turned into
> a Guile extension (a shared library and its companion Scheme module
> that loads it with ‘load-extension’) that would expose make’s
> functionality.

I'm not sure I'm interested in going to that extreme.  GNU make has one
overarching, guiding concept: it's a critical component of a GNU-based
POSIX environment.  All POSIX-standard makefiles must work in GNU make,
and there are hundreds of thousands of already-existing makefiles, both
for POSIX and GNU versions of make.  Obviously asking people to start
writing makefiles in Scheme would not be appropriate.

A technically acceptable option would be to build GNU make in two forms:
first a standalone application that worked as now, and second a
"library" that could be linked as a Guile extension.

However, from what I've read of Guile that would be an immense amount of
work: GNU make was created over 20 years ago and has a lot of
not-completely-clean features and implementation details which rely on
it being a stand-alone program.  There's massive amounts of global
memory usage, not even a nod to threading capabilities or locking, and
features like automatically re-exec'ing itself in some situations.

Finally, while it's a cool idea I'm not sure there's a compelling need
for this.  Have lots of people wanted to be able to define make-type
rules and invoke make-like algorithms in Guile programs?  Coming from
the GNU make side, I've never heard of such a request.  Of course
sometimes the usages aren't clear before the capability exists;
nevertheless there are so many things to do to GNU make proper that I
can't justify the effort this would take, for the apparent return
involved.  If someone else were interested in it I'd be happy to work
with them on cleanups to the GNU make codebase that would enable this,
as long as they were generally appropriate.


My main purpose is to add some kind of scripting capability to GNU make
to augment the current functions capability.  So many people want me to
add new functions to GNU make, and they're very useful functions, but
I'm not interested in creating yet another complete scripting language.
I'd rather choose an existing language and allow GNU make makefiles to
take advantage of it.  Guile seems like a natural choice for many
reasons.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "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]