* Paul Smith <[email protected]> [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
pgpkJpA49sqUn.pgp
Description: PGP signature
_______________________________________________ Bug-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-make
