From: Kaz Kylheku
Subject: ANN: GNU Make based linking system for CLISP images.
Date: 
Message-ID: <1119067530.032020.28040@g14g2000cwa.googlegroups.com>
I've written a replacement for nearly the entire functionality of the
``clisp-link add-module-set'' script.

The replacement takes the form of a single namespace-hygienic include
file for GNU Make, which sets up proper dependency rules among all of
the initial, intermediate and final target objects. Absolute and
relative paths are fed to the compilers, as appropriate, so no symbolic
links are ever constructed, and no ``chdir'' operations take place
whatsoever, nor are ``make'' subprocesses ever invoked. No special
directory structure must be set up, and no link.sh script is required.
Two-step boostrapping of the memory image is supported: if one or more
preload files are specified, rules are automatically set up to build an
intermediate lispinit.mem using the original Lisp image plus these
modules, and then that intermediate lispinit.mem is used in conjunction
with the newly linked CLISP binary with the new FFI code to load the
remaining modules and dump the final lispinit.mem. The makefile finds
the CLISP library directory (such as /usr/local/lib/clisp or whatever)
automatically, so there is nothing to configure externally. Also, it
outputs, in a variable, a complete list of all intermediate objects and
targets, which can be easily included in the host Makefile's rule for
the ``clean'' target. Thus, it's now complete cinch to hack up some
CLISP FFI and have it rolled up into a custom lisp.run and
lispinit.mem, hooking the entire procedure neatly into an existing
Makefile-based project.

This package contains the ``clisp.mk'' include file, surrounded by a
complete working example. I developed it on make 3.80. Some
target-specific assignments failed on 3.79 in a bizarre way which was
apparently fixed by having a definition for CFLAGS at the top level in
the main Makefile.

http://users.footprints.net/~kaz/clink-0.2.tar.gz