[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fw: guile or scheme used to implement make or meson
From: |
Mike Gran |
Subject: |
Fw: guile or scheme used to implement make or meson |
Date: |
Tue, 12 Sep 2023 12:39:04 +0000 (UTC) |
(forwarding to guile-user because I forgot to reply-all)
> Is using Guile, or a similar Scheme implementation, to re-implement
> make or meson realistic?
Andy-
I did actually try to do a make in Guile once. As it turns out, _make_
as a language is rather harder than it looks, especially if you start
trying to add in GNU extensions or BSD extensions to POSIX make.
The language is a bit of a muddle: parsing any token depends on
neighboring tokens in a non-trivial way. Reimplementing GNU make
might require transliterating a C make into scheme, rather than starting with
a formal grammar and filling in from there.
However, it should be possible to do a strict POSIX make relatively easily.
POSIX make largely relies on the shell for its expressive power. Starting from a
strict POSIX make and expanding upwards from there is a reasonable
strategy.
See pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html
for what POSIX make does and does not do.
While I never finished writing a make, I did make a build tool in Guile
inspired by make. But it is mostly a toy, and not actively maintained.
github.com/spk121/potato-make
Regards,
Mike Gran