0.8.5.26:
[sbcl.git] / contrib / asdf-install / asdf-install.asd
1 ;;; -*-  Lisp -*-
2
3 (defpackage #:asdf-install-system 
4   (:use #:cl #:asdf))
5
6 (in-package #:asdf-install-system)
7 (require 'sb-executable)
8
9 ;;; this is appalling misuse of asdf.  please don't treat it as any
10 ;;; kind of example.  this shouldn't be a compile-op, or if it is, should
11 ;;; define output-files properly instead of leaving it be the fasl
12 (defclass exe-file (cl-source-file) ())
13 (defmethod perform :after ((o compile-op) (c exe-file))
14   (sb-executable:make-executable
15    (make-pathname :name "asdf-install"
16                   :type nil
17                   :defaults (component-pathname c))
18    (output-files o c)
19    :initial-function "RUN"))
20
21 (defmethod perform ((o load-op) (c exe-file)) nil)
22
23 (defsystem asdf-install
24   :depends-on (sb-posix sb-bsd-sockets)
25   :version "0.2"
26   #+sb-building-contrib :pathname
27   #+sb-building-contrib "SYS:CONTRIB;ASDF-INSTALL;"
28   :components ((:file "defpackage")
29                (:exe-file "loader" :depends-on ("installer"))
30                (:file "installer" :depends-on ("defpackage"))))
31                
32 (defmethod perform :after ((o load-op) (c (eql (find-system :asdf-install))))
33   (provide 'asdf-install))
34
35 (defmethod perform ((o test-op) (c (eql (find-system :asdf-install))))
36   t)