bug-make
[Top][All Lists]
Advanced

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

Re: [patch] Guile conditional


From: Dmitry Bogatov
Subject: Re: [patch] Guile conditional
Date: Fri, 3 Jul 2015 08:52:39 +0300
User-agent: Mutt/1.5.23.1-rc1 (2014-03-12)

* Paul Smith <address@hidden> [2015-07-02 14:03:22-0400]
> On Thu, 2015-07-02 at 20:48 +0300, Dmitry Bogatov wrote:
> > > Can't you write:
> > >
> > >   ifneq ($(guile some s-sexpression),)
> > >
> > > It's not quite as clean, but it doesn't require new syntax which has its
> > > own advantages.
>
> > Currently Guile integration is limited to gmk-eval and is little
> > better then
> >
> >         $(eval $(shell ./some-helper-script))
>
> I don't understand.
>
> First, Guile integration is NOT limited to gmk-eval; if you build with
> Guile enabled you get a $(guile ...) GNU make built-in function which
> takes its argument and sends it to the Guile interpreter, and expands to
> the result.  See [link]
> although definitely some examples are needed here.  To understand the
> interface see [link]
> Second, this is far different from the example you suggest because your
> version invokes a separate shell process.  The guile function uses the
> built-in interpreter just like your change does.

Correct. I missed `guile' function use for text manipulation and
conditions.

> > This patch integrate them a little deeper. And, by the way (VAR != ls
> > -A) assignment is very like this.

The following two assignments is same:

FOO != ls -A
FOO := $(shell ls -A | sed-magic)

in same way as

ifscm (some s-expression)
ifneq ($(guile some s-sexpression),)

So I believe `ifscm' deserve it's life in same degree as `!='. Probably
even `=(some-sexp)' syntax as alias to `= $(guile some-sexp)' too,
although I did not found it useful yet.

Another analogy would be Bash. We have in Bash ${!foo} indirect value
syntax, despite historically it always was solved by `eval'. Just
convenience.

--
Accept: text/plain, text/x-diff
Accept-Language: eo,en,ru
X-Keep-In-CC: yes

Attachment: pgpmnCJiteC9g.pgp
Description: PGP signature


reply via email to

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