Building `make-guile` on MacOS
I’ve been experimenting with GNU Make with the optional Guile
support. On Debian, make-guile
is a package, but on MacOS I had to build
a local copy, tying in the Homebrew build of Guile.
First, to verify that your installation of GNU Make doesn’t already have Guile
support, use this small Makefile to test the .FEATURES
variable.
$ cat > ~/Makefile.test-guile
has_guile:
@if echo $(.FEATURES) | grep -vq guile; then \
echo "no \c"; \
fi; echo "guile support"
^D
Now we have a test we can use with various GNU Make deployments:
$ make -f ~/Makefile.test-guile
no guile support
To build make, we will need a C compilation environment, the source archive for
GNU Make, and a working libguile
. For the latter, I chose to reuse the
guile
built by Homebrew.
$ brew install guile
Then, configuration should look something like
$ ./configure $(autoargs) --with-guile \
GUILE_CFLAGS=-I/usr/local/include/guile/2.2 \
GUILE_LIBS="-L/usr/local/lib \
-lguile-2.2.0"
....
(autoargs
is a utility that sets PREFIX
and other autoconf
variables for
installation into my home directory on the local system.)
After a make
and make install
, we should have a version of make
we can
invoke:
$ make -f ~/Makefile.test-guile
guile support
Now we have a means to experiment with Scheme in the context of the Make/Guile platform.