CLEANFILES += *.core *.fasl
+SBCL_BUILD = ./sbcl-build
+
.SUFFIXES: .lisp .fasl
.lisp.fasl:
- $(call v_echo,CL)sbcl --noinform --eval \
- '(quit :unix-status (if (compile-file "$<" :verbose nil :print nil) 0 1))'
+ $(call v_echo,CL)$(SBCL_BUILD) build $<
LANGS += cl
SOURCES += cl-fringe.lisp
cl-fringe: cl-fringe.fasl
- $(call v_echo,CP)cp $< $@.new && chmod +x $@.new && mv $@.new $@
-## $(call v_echo,CL)cl-launch -o $@ -f `pwd`/$^ +I -r launch -d $@.core
+ $(call v_echo,CLLD)$(SBCL_BUILD) link $@ $^
###--------------------------------------------------------------------------
### F#.
--- /dev/null
+#! /bin/sh -e
+#| -*-lisp-*-
+exec sbcl --script "$0" "$0" "$@"
+|#
+
+(require 'sb-executable)
+
+(let* ((args (cdr *posix-argv*))
+ (prog (pop args))
+ (cmd (pop args)))
+ (cond
+ ((string= cmd "build")
+ (let ((rc 0))
+ (dolist (file args)
+ (unless (compile-file file :verbose nil :print nil)
+ (setf rc 1)))
+ (quit :unix-status rc)))
+ ((string= cmd "link")
+ (let ((out (pop args)))
+ (sb-executable:make-executable out args)))
+ (t
+ (format *error-output* "~A: unknown command `~A'~%" prog cmd)
+ (quit :unix-status 1))))