Commit fa225349 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Tweak the asdf-tools script some more.

Use CCL by default, which will be more portable.
More tweaking of system loading configuration.
parent 5da1cd72
":" ; exec sbcl --script "$0" "$@" ; exit # -*- Lisp -*-
;;;;; Really runs on any decent Common Lisp implementation
;;;;; Can also be invoked by cl-launch 4:
;;;;; cl-launch -sp asdf-tools -r entry-point -- "$@"
":" ; exec ${CCL:-ccl} --load "$0" -- "$@" ; exit # -*- Lisp -*-
#|
asdf-tools could also run on SBCL, or on any decent Common Lisp implementation,
including using cl-launch, but CCL is the single implementation that has decent
portable support on all of Windows, Linux (x64, x86, ARM), MacOS X
":" ; exec ${SBCL:-sbcl} --script "$0" "$@" ; exit
":" ; cl-launch -l ccl -Q -sp asdf-tools -r entry-point -- "$@"
|#
(in-package :cl-user) ;; That may be default, but let's make double sure and tell SLIME.
......@@ -13,24 +17,28 @@
(or *compile-file-truename* *load-truename* (truename *default-pathname-defaults*))))))
;;; ASDF3 is loaded, now use it!
(in-package :asdf)
(eval-when (:compile-toplevel :load-toplevel :execute)
;; For bootstrap purposes, avoid having to extract cl-launch.asd into ext/cl-launch/
(let ((cl-launch-dir (uiop:subpathname (uiop:current-lisp-file-pathname) "../ext/cl-launch/")))
(when (uiop:probe-file* (uiop:subpathname cl-launch-dir "dispatch.lisp"))
(asdf:register-preloaded-system
:cl-launch/dispatch
:class :package-inferred-system
:source-file nil
:pathname cl-launch-dir
:components '((cl-source-file "lisp" :pathname "dispatch.lisp")))))
;; Load either with or without quicklisp
#-quicklisp
(asdf:load-system :asdf-tools :verbose nil)
#+quicklisp
(let ((*standard-output* (make-broadcast-stream)))
(ql:quickload :asdf-tools)))
(in-package :asdf-tools)
(let* ((asdf-dir (pathname-parent-directory-pathname
(ensure-absolute-pathname (current-lisp-file-pathname) 'getcwd)))
(cl-launch-dir (subpathname asdf-dir "ext/cl-launch/")))
(when (and (not (find-system "cl-launch/dispatch" nil))
(probe-file* (subpathname cl-launch-dir "dispatch.lisp")))
(eval `(defsystem "cl-launch/dispatch"
:class :package-inferred-system
:source-file nil
:pathname ,cl-launch-dir
:components ((cl-source-file "lisp" :pathname "dispatch.lisp"))))))
;; Depending on whether Quicklisp was loaded or not, either use it or use regular load-system
(defun load-sys (system)
(if (featurep :quicklisp)
(let ((*standard-output* (make-broadcast-stream))) ;; be quiet
(ql:quickload system))
(load-system system :verbose nil)))
;; Finally, load asdf-tools
(load-sys "asdf-tools"))
;;; Actually run the stuff!
(restore-image :entry-point 'entry-point :lisp-interaction nil)
;;; asdf-tools is loaded, now actually run it!
(restore-image :entry-point 'asdf-tools::entry-point :lisp-interaction nil)
......@@ -75,7 +75,7 @@
;; we'd move this form right below the (funcall 'require "asdf") above.
;; See also notes in 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
(asdf-lisp ()
;; Here, define where your Lisp source code hierarchy stores its copy of ASDF.
......@@ -129,7 +129,7 @@
;; The above should already cover all paths that we use;
;; we don't want user configuration to interfere with the build.
:ignore-inherited-configuration)))
;; No more user-configurable parts below.
;; ****** No more user-configurable parts below. ******
(asdf-call 'initialize-source-registry source-registry)
(asdf-call 'initialize-output-translations output-translations))))
;; Configure the printer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment