updated Makefile to use new standard lisp template

This commit is contained in:
a. fox 2023-07-31 15:05:29 -04:00
parent b3d280232e
commit 28efaf51bf
1 changed files with 11 additions and 16 deletions

View File

@ -1,24 +1,19 @@
LISPS = ros sbcl clisp cmucl ccl
CMDS = --eval "(ql:quickload :timecalc)" --eval "(asdf:make :timecalc)" --eval "(quit)"
SYSTEM_NAME = timecalc
define LISP_CMDS
"(handler-case \
(progn (ql:quickload :SYSTEM) \
(asdf:make :SYSTEM)) \
(error (e) \
(format t \"~A~%\" e) \
(uiop:quit 1)))"
endef
ifeq ($(OS),Windows_NT)
LISP := $(foreach lisp,$(LISPS), \
$(shell where $(lisp)) \
$(if $(.SHELLSTATUS),$(strip $(lisp)),))
else
LISP := $(foreach lisp,$(LISPS), \
$(if $(findstring $(lisp),"$(shell which $(lisp) 2>/dev/null)"), $(strip $(lisp)),))
endif
ifeq ($(LISP),)
$(error "No lisps found")
endif
CMDS = --eval $(subst SYSTEM,$(SYSTEM_NAME),$(LISP_CMDS))
.PHONY: clean all
all:
$(LISP) $(CMDS)
ros $(CMDS)
clean:
rm -rf bin/