chiark / gitweb /
Makefile, sbcl-build: Refresh the Common Lisp build system.
[fringe] / sbcl-build
1 #! /bin/sh -e
2 #| -*-lisp-*-
3 exec sbcl --script "$0" "$0" "$@"
4 |#
5
6 (require 'sb-executable)
7
8 (let* ((args (cdr *posix-argv*))
9        (prog (pop args))
10        (cmd (pop args)))
11   (cond
12     ((string= cmd "build")
13      (let ((rc 0))
14        (dolist (file args)
15          (unless (compile-file file :verbose nil :print nil)
16            (setf rc 1)))
17        (quit :unix-status rc)))
18     ((string= cmd "link")
19      (let ((out (pop args)))
20        (sb-executable:make-executable out args)))
21     (t
22      (format *error-output* "~A: unknown command `~A'~%" prog cmd)
23      (quit :unix-status 1))))