On 2025-03-01 00:06, Basile Starynkevitch wrote:
> So I want an example of GNU guile code (invoked by GNU make) which triggers 
> the
> build of a given GNU make target identified by a GNU guile string value.
> 
> Thanks for your help

Unfortunately, the integration between Make and Guile is rather scant.
Make exposes a couple of functions to Guile for evaluating a character
string as a Makefile fragment (as if by the $(eval ...) function, I think)
and for doing Make-style expansion of syntax, such as a $(variable) reference.

With that, you can use Guile to generate Makefile material on the fly.

Perhaps a variable assignment like "FOO := BAR" can be evaluated by Guile
in order to create or modify a variable.

I haven't seen an API into Make's rule base, whereby you could instruct it
to update a target and such.

I think, it should be possible for Guile code to generate a default target
rule the fly, to throw it in Make's evaluation path, so to speak.

I could be wrong on many points, but if it sparks more discussion, that
would be good.

Reply via email to