Skip to content
Snippets Groups Projects
Commit fe3d1afc authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Make asdf-tools work well with quicklisp.

Fix parenthesizing so ASDF is always being configured properly (Oops).
parent 9b8170cc
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
;;; ASDF3 is loaded, now use it! ;;; ASDF3 is loaded, now use it!
(eval-when (:compile-toplevel :load-toplevel :execute) (eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:load-system :asdf-tools)) (#-quicklisp asdf:load-system #+quicklisp ql:quickload :asdf-tools))
;;; Actually run the stuff! ;;; Actually run the stuff!
(uiop:restore-image :entry-point 'asdf-tools::entry-point) (uiop:restore-image :entry-point 'asdf-tools::entry-point)
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
(merge-pathnames (make-pathname :defaults parent (merge-pathnames (make-pathname :defaults parent
:directory (cons :relative directory) :directory (cons :relative directory)
:name name :type type :version version) :name name :type type :version version)
parent)) (make-pathname :name nil :type nil :version nil :defaults parent)))
(here-directory () (here-directory ()
(subpath (or *compile-file-truename* *load-truename* (subpath (or *compile-file-truename* *load-truename*
(truename *default-pathname-defaults*)))) (truename *default-pathname-defaults*))))
...@@ -55,26 +55,26 @@ ...@@ -55,26 +55,26 @@
(unless (member :asdf2 *features*) (unless (member :asdf2 *features*)
(or (and (try-load (asdf-lisp)) (member :asdf2 *features*)) (or (and (try-load (asdf-lisp)) (member :asdf2 *features*))
(error "This Lisp implementation fails to provide ASDF 2 or later. ~ (error "This Lisp implementation fails to provide ASDF 2 or later. ~
Please install it in ~A" (asdf-lisp))) Please install it in ~A" (asdf-lisp))))
;; Configure ASDF ;; Configure ASDF
(configure-asdf) (configure-asdf)
(let ((provided-version (asdf-version))) (let ((provided-version (asdf-version)))
;; Upgrade ASDF to what we configured it to be. ;; Upgrade ASDF to what we configured it to be.
(asdf-call 'load-system :asdf) (asdf-call 'load-system :asdf)
;; If the implementation-provided version was too old, ;; If the implementation-provided version was too old,
;; we need to re-configure, because old configuration may have been moved away. ;; we need to re-configure, because old configuration may have been moved away.
(unless (asdf-call 'version-satisfies provided-version "2.27") (unless (asdf-call 'version-satisfies provided-version "2.27")
(configure-asdf))) (configure-asdf)))
(unless (asdf-call 'version-satisfies (asdf-version) (required-asdf-version)) (unless (asdf-call 'version-satisfies (asdf-version) (required-asdf-version))
(error "This program needs ASDF ~A but could only find ASDF ~A" (error "This program needs ASDF ~A but could only find ASDF ~A"
(required-asdf-version) (asdf-version))) (required-asdf-version) (asdf-version)))
;; Here, we specifically want the ASDF in the current git checkout over ;; Here, we specifically want the ASDF in the current git checkout over
;; whatever quicklisp is providing, so we load quicklisp last. ;; whatever quicklisp is providing, so we load quicklisp last.
;; If the checkout weren't providing ASDF and we wanted to rely on Quicklisp ;; If the checkout weren't providing ASDF and we wanted to rely on Quicklisp
;; to provide a copy of ASDF that the implementation might be lacking, ;; to provide a copy of ASDF that the implementation might be lacking,
;; we'd move this form right below the (funcall 'require "asdf") above. ;; we'd move this form right below the (funcall 'require "asdf") above.
;; See also notes in try-load-quicklisp. ;; See also notes in try-load-quicklisp.
(try-load-quicklisp))) (try-load-quicklisp))
;; User-configurable parts ;; User-configurable parts
(required-asdf-version () "3.1.2") ;; In the end, we want at least ASDF 3.1.2 (required-asdf-version () "3.1.2") ;; In the end, we want at least ASDF 3.1.2
(asdf-lisp () (asdf-lisp ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment