I am trying to get the following Makefile to work somewhat efficiently, however as make iterates over each egg some of the same dependencies are installed over and over again:
# Need to run as follows (PREFIX is the path to where the iup lib is installed):
#
# CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib" make deploy
CSCOPTS=
SRCFILES=src/db.scm
SOFILES = $(SRCFILES:%.scm=%.so)
DEPLOYSOFILES = $(SOFILES:src/%=deploytarg/%)
EGGS=matchable readline apropos base64 regex-literals format regex-case test coops trace csv \
dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt \
json md5 awful http-client spiffy uri-common intarweb spiffy-request-vars \
spiffy-directory-listing ssax sxml-serializer sxml-modifications srfi-42 matchable \
iup canvas-draw sqlite3
DPLYEGGS = $(EGGS:%=deploytarg/%.so)
all : dashboard
deploy : deploytarg/dashboard
src/%.so : src/%.scm
csc $(CSCOPTS) -J -s $<
cp src/$*.so $*.import.scm deploytarg
deploytarg/%.so : Makefile
chicken-install -p deploytarg -deploy $*
deploytarg/dashboard : $(DPLYEGGS) $(DEPLOYSOFILES) src/dashboard.scm
csc -deploy $(OFILES) src/dashboard.scm -o deploytarg
mv deploytarg/deploytarg deploytarg/dashboard