From: ludo@gnu.org (Ludovic Courtès)
To: psmith@gnu.org
Cc: guile-user@gnu.org
Subject: Re: Embedding vs. Extending
Date: Sun, 18 Sep 2011 23:48:07 +0200 [thread overview]
Message-ID: <87aaa14j54.fsf@gnu.org> (raw)
In-Reply-To: <1316366468.28907.138.camel@homebase> (Paul Smith's message of "Sun, 18 Sep 2011 13:21:08 -0400")
Hi!
Paul Smith <psmith@gnu.org> skribis:
> 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.
[...]
> 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.
Yes.
> 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.
Yeah, widespread use of global variables and such is likely to make a
hypothetical ‘make’ library much less useful.
> Finally, while it's a cool idea I'm not sure there's a compelling need
> for this.
Here’s an example: DMake [0] is concerned with makefile task scheduling
on distributed architectures. To do that, it needs to know the DAG of
tasks defined in a makefile. To achieve that, it ends up parsing the
output of ‘make -ptq’; it works, but it’s fragile (has to use the C
locale, is sensitive to formatting changes, etc.), and suboptimal.
Imagine if this could be achieved simply by having DMake directly call
make’s library functions to get the data it needs.
[0] http://dmake.ligforge.imag.fr/
Another example: many projects have make-like functionality built-in.
For instance, Java compilers (ahem...) have dependency tracking
built-in; Rubber [1] automatically infers dependencies from LaTeX source
files and runs the right actions in the right order; Guile’s
auto-compilation feature is a simple .scm → .go rule; and so on.
[1] https://launchpad.net/rubber
I could probably come up with others if you’re curious. ;-)
> My main purpose is to add some kind of scripting capability to GNU make
> to augment the current functions capability.
And this is a worthy goal too!
Thanks,
Ludo’.
next prev parent reply other threads:[~2011-09-18 21:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-18 0:10 Using guile as an extension language for GNU make Paul Smith
2011-09-18 12:10 ` Ludovic Courtès
2011-09-18 17:21 ` Embedding vs. Extending (was: Re: Using guile as an extension language for GNU make) Paul Smith
2011-09-18 21:48 ` Ludovic Courtès [this message]
2011-09-18 17:42 ` Using guile as an extension language for GNU make Paul Smith
2011-09-18 21:28 ` Ludovic Courtès
2011-09-18 15:30 ` Thien-Thi Nguyen
2011-09-18 19:28 ` Paul Smith
2011-09-19 0:28 ` Thien-Thi Nguyen
2011-09-19 15:14 ` Paul Smith
2011-09-19 19:41 ` Hans Aberg
2011-09-19 21:56 ` Paul Smith
2011-09-19 22:35 ` Hans Aberg
2011-09-19 23:00 ` Hans Aberg
2011-09-21 2:42 ` Mark H Weaver
2011-09-21 8:24 ` Hans Aberg
2011-09-20 16:17 ` Thien-Thi Nguyen
2011-09-20 17:31 ` Paul Smith
2011-09-20 19:02 ` Paul Smith
2011-09-21 0:48 ` Thien-Thi Nguyen
2011-09-20 20:39 ` Thien-Thi Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aaa14j54.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-user@gnu.org \
--cc=psmith@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).