From: Mark Wooding Date: Mon, 17 Jun 2024 16:32:56 +0000 (+0100) Subject: Makefile, zone.asd: Use ASDF and `runlisp' for building images. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/zone/commitdiff_plain/82b647f00acaa4a0a3067a9ef322b959e1165fce Makefile, zone.asd: Use ASDF and `runlisp' for building images. ASDF will make standalone images rather than the weird shell-script- assisted things that `cl-launch' produces. This is a little tricky because ASDF output translations can't match just a filename with no type. As a bodge, produce the image with a `.img' extension and rename in the makefile. --- diff --git a/Makefile b/Makefile index 6cbf595..868a9cf 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +bindir = $(HOME)/bin + SOURCES = \ zone.asd \ frontend.lisp \ @@ -5,9 +7,11 @@ SOURCES = \ net.lisp serv.lisp sys.lisp \ addr-family-ipv4.lisp addr-family-ipv6.lisp -CLEANFILES += zone all:: zone zone: $(SOURCES) - cl-launch -o $@ -s zone +I -d `pwd`/zone.core -r zone.frontend:main - -clean:; rm -f $(CLEANFILES) + ASDF_OUTPUT_TRANSLATIONS="(:output-translations ((#p\"$(abspath zone.img)\") t) :inherit-configuration)" \ + runlisp -e "(progn (asdf:clear-configuration) (asdf:operate 'asdf:program-op \"zone\"))" + mv zone.img $@ +clean:: rm -f zone +install:: zone + install zone $(bindir)/ diff --git a/zone.asd b/zone.asd index b0544a1..6c143e8 100644 --- a/zone.asd +++ b/zone.asd @@ -5,6 +5,8 @@ :version "1.0.0" :author "Mark Wooding " :depends-on ("mdw" #+ecl "cffi" #+sbcl "sb-bsd-sockets") + :entry-point "zone.frontend:main" + :build-pathname "zone.img" :components ((:file "net-package") (:file "sys") (:file "net")