guile-user
[Top][All Lists]
Advanced

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

Re: Using guile as an extension language for GNU make


From: Hans Aberg
Subject: Re: Using guile as an extension language for GNU make
Date: Tue, 20 Sep 2011 00:35:28 +0200

On 19 Sep 2011, at 23:56, Paul Smith wrote:

> The first stage of make is reading in all the makefiles.  As part of
> this, variables and functions are expanded (one line at a time) and the
> result is a string.

Its parser is handwritten, and perhaps not easy to tweak, and get 'make' 
variables and stuff into Guile.

> The $(guile ...) make function, like all other make functions and
> variables, is expanded in this way, so the return value of the guile
> function must be converted to a string and appended to the string buffer
> make is constructing.  Once all of the input is expanded and the
> expansion is added to the buffer, then make will go back and parse it
> (exactly how this is done is very context-dependent).

There is the pretty-print module.
  (use-modules (ice-9 pretty-print))

Perhaps you might check how it is implemented.

Hans





reply via email to

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