File: cmucl-install-subsystem.lisp

package info (click to toggle)
cl-pg 1:20061216-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 276 kB
  • ctags: 233
  • sloc: lisp: 3,125; makefile: 43
file content (31 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download | duplicates (5)
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
;;; cmucl-install-subsystem.lisp
;;
;;
;; Loading this into CMUCL will install pg.lisp as a CMUCL subsystem,
;; that can be loaded with
;;
;;   (require :pg)
;;
;; Note that the user running CMUCL needs to have write access to the
;; subsystems directory (so you may need to run this as root).


(let ((fasl-1 (compile-file "defpackage" :load t))
      (fasl-2 (compile-file "sysdep" :load t))
      (fasl-3 (compile-file "pg")))
  (with-open-file (out (compile-file-pathname "library:subsystems/pg-library")
                       :direction :output
                       :element-type '(unsigned-byte 8)
                       :if-exists :supersede)
    (dolist (f (list fasl-1 fasl-2 fasl-3))
      (with-open-file (in f
                          :direction :input
                          :element-type '(unsigned-byte 8))
        (loop
         :with buffer = (make-array 1024 :element-type '(unsigned-byte 8))
         :for n = (read-sequence buffer in)
         :until (= n 0)
         :do (write-sequence buffer out :end n))))))


;; EOF