0.8.2.23
[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 oif leaving it be the fasl
12 (defclass exe-file (cl-source-file) ())
13 (defmethod perform ((o compile-op) (c exe-file))
14   (call-next-method)
15   (sb-executable:make-executable
16    (make-pathname :name "asdf-install"
17                   :type nil
18                   :defaults (component-pathname c))
19    (output-files o c)
20    :initial-function "RUN"))
21
22 (defmethod perform ((o load-op) (c exe-file)) nil)
23
24 (defsystem asdf-install
25   :depends-on (sb-posix sb-bsd-sockets)
26   :version "0.2"
27   :components ((:file "defpackage")
28                (exe-file "loader")
29                (:file "installer")))
30                
31 (defmethod perform :after ((o load-op) (c (eql (find-system :asdf-install))))
32   (provide 'asdf-install))
33
34 (defmethod perform ((o test-op) (c (eql (find-system :asdf-install))))
35   t)