source: tags/1.0.0/abcl/contrib/asdf-install/load-asdf-install.lisp

Last change on this file was 12487, checked in by Mark Evenson, 14 years ago

Port of ASDF-INSTALL under 'contrib/asdf-install'.

'abcl.contrib' will package ASDF-INSTALL in dist/abcl-contrib.jar.

We only have one contrib 'asdf-install'. It is not expected to work
well under Windows at the moment.

To use ASDF-INSTALL, use the following in your ~/.abclrc:

(require 'asdf)
(pushnew "jar:file:${dist.dir}/abcl-contrib.jar!/asdf-install/" asdf:*central-registry*)

Then issuing

CL-USER> (require 'asdf-install)

will load ASDF-INSTALL.

A file ~/.asdf-install can contain customizations to help ASDF-INSTALL
find the programs 'tar' and 'gpg'. 'tar' is searched for in
asdf-install:*shell-search-paths*. The location of 'gpg' can be
customized by setting *gpg-command* to a string containing the file.
This behavior should be rationalized in the future.

ASDF-INSTALL tested under OSX.

File size: 2.7 KB
Line 
1;;; -*- Mode: Lisp -*-
2
3;;; load-asdf-install.lisp --
4;;; Generic loader for ASDF-INSTALL.
5
6(eval-when (:load-toplevel :execute)
7  (unless (find-package '#:asdf-install-loader)
8    (make-package '#:asdf-install-loader :use '(#:common-lisp))))
9
10(in-package :asdf-install-loader)
11
12(eval-when (:compile-toplevel :load-toplevel :execute)
13  (defparameter *asdf-install-directory*
14    (make-pathname :host (pathname-host *load-truename*)
15       :device (pathname-device *load-truename*)
16       :directory (pathname-directory *load-truename*)
17       ;; :case :common ; Do we need this?
18       )))
19
20
21(defun cl-user::load-asdf-install
22  (&key
23   (directory *asdf-install-directory*)
24   (compile-first-p nil)
25   (load-verbose *load-verbose*)
26   (print-herald t)
27   )
28  (when print-herald
29    (format *standard-output*
30      "~&;;; ASDF-INSTALL: Loading ASDF-INSTALL package from directory~@
31               ;;;               \"~A\"~2%"
32      (namestring (pathname directory))))
33  (let ((directory (pathname directory)))
34    (flet ((load-and-or-compile (file)
35       (if compile-first-p
36     (multiple-value-bind (output-truename warnings-p failure-p)
37         (compile-file file)
38       ;; (declare (ignore warnings-p))
39       (when failure-p
40         (format *standard-output*
41           ";;; File ~S compiled~@
42                              ;;; Warnings ~S, Failure ~S.~%"
43           output-truename
44           warnings-p
45           failure-p)
46         (return-from cl-user::load-asdf-install nil)
47         )
48       (load output-truename :verbose load-verbose))
49     (load file :verbose load-verbose)))
50     )
51
52      (setf (logical-pathname-translations "ASDF-INSTALL-LIBRARY")
53      `(("**;*.*.*"
54         ,(make-pathname
55     :host (pathname-host directory)
56     :device (pathname-device directory)
57     :directory (append (pathname-directory directory)
58            (list :wild-inferiors))))
59        ("**;*.*"
60         ,(make-pathname
61     :host (pathname-host directory)
62     :device (pathname-device directory)
63     :directory (append (pathname-directory directory)
64            (list :wild-inferiors))))))
65
66      (load-and-or-compile "ASDF-INSTALL-LIBRARY:defpackage.lisp")
67      (load-and-or-compile "ASDF-INSTALL-LIBRARY:port.lisp")
68
69      (unless (find-package '#:split-sequence)
70        (load-and-or-compile "ASDF-INSTALL-LIBRARY:split-sequence.lisp"))
71
72      (load-and-or-compile "ASDF-INSTALL-LIBRARY:installer.lisp")
73
74      ;; (load-and-or-compile "ASDF-INSTALL-LIBRARY:loader.lisp")
75
76      ))
77  (pushnew :asdf-install *features*)
78  (provide 'asdf-install)
79
80  ;; To clean a minimum (and to make things difficult to debug)...
81  ;; (delete-package '#:asdf-install-loader)
82  )
83
84
85;;; Automatically load the library.
86
87(eval-when (:load-toplevel :execute)
88  (cl-user::load-asdf-install))
89
90;;; end of file -- load-asdf-install.lisp --
Note: See TracBrowser for help on using the repository browser.