guile-user
[Top][All Lists]
Advanced

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

Re: Guile support in GNU make


From: Paul Smith
Subject: Re: Guile support in GNU make
Date: Mon, 16 Jan 2012 09:07:58 -0500

On Sun, 2012-01-15 at 23:02 +0100, Ludovic Courts wrote:
> And thanks for the great news!  :-)

I promoted the feature to GNU make CVS (I know, still CVS!!) on
Savannah.  I hope to generate a test dist file sometime this week.  I'll
email when it's available if people want to take a look.

> Paul Smith <address@hidden> skribis:
> >> - The ‘#t => t’ distinguishes the symbol t from others, which feels wrong.
> >>   I suggest #t => ""; #f => error.
> >
> > Hm. The problem with this is that we can't easily use Guile booleans in
> > GNU make.  For example, the syntax for make's $(if ...) function is:
> >
> >         $(if <condition>,<then>[,<else>])
> >
> > The <condition> is expanded as a makefile expression and if it's empty
> > it's considered false.  If it's non-empty it's considered true.
> 
> Would it be possible for Make to delay the conversion of SCMs to
> strings, and in turn to differentiate between conditions as strings, and
> conditions that are SCMs?

I don't think this is possible.  Make has no "data types" at all.  It
just manipulates strings--every operation in make is a string operation,
and the "results" of operations are just constructing new string buffers
by doing string manipulations, then passing that string to the next
function (or whatever).

There's just no facility anywhere internal to make to store or
manipulate a non-string item.

I suppose one option would be to have #f translate to the string "#f"
and change the definition in make of "false" to be "either the empty
string OR the string #f".  Since "#" is a comment character in make it's
highly unlikely (although not impossible) someone would have that as a
valid value.  However, this would be a lot of effort (finding all the
places in make that use the empty string as "false" and modifying them).
And I'm not sure it wouldn't cause other issues.  I think, all in all,
it's better to leave it as-is unless someone can point out a real
problem with it (besides a general unpleasant aftertaste).

-- 
-------------------------------------------------------------------------------
 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]