-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.lisp
33 lines (30 loc) · 1.38 KB
/
make.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(defparameter *sbcl* (nth 0 sb-ext:*posix-argv*))
(defparameter *cmd* (nth 1 sb-ext:*posix-argv*))
(defparameter *gpg* (or (nth 2 sb-ext:*posix-argv*) "gpg"))
(defparameter *lib* (sb-ext:native-pathname (nth 3 sb-ext:*posix-argv*)))
(load "asdf.conf")
(load "quicklisp/setup.lisp")
(ql:quickload "gpg-utilities")
(asdf:operate 'asdf:monolithic-deliver-asd-op "gpg-utilities")
(with-open-file (f (format nil "build/~A" *cmd*) :direction :output
:if-does-not-exist :create
:if-exists :supersede)
(with-standard-io-syntax
(let ((*print-pretty* t)
(*print-right-margin* 78)
(*print-case* :downcase))
(format f "#!~A --script~%~@{~S~%~}"
*sbcl*
'(require "asdf")
(list 'asdf:initialize-source-registry
(list 'quote
(list :source-registry
:ignore-inherited-configuration
(list :directory *lib*))))
'(handler-case
(asdf:operate 'asdf:monolithic-load-bundle-op "gpg-utilities")
(serious-condition (c)
(format *error-output* "~A~%" c)
(sb-ext:exit :code 1)))
(list 'setf 'common:*gpg-program* *gpg*)
(list 'start:start *cmd*)))))