":" ; 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. ;;; Ensure we load and configure this particular ASDF (eval-when (:compile-toplevel :load-toplevel :execute) (unless (member :cl-launch *features*) ;; (not necessary if we're invoked via cl-launch) (load (make-pathname :name "load-asdf" :type "lisp" :defaults (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* ((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 (symbol-call :ql :quickload system)) (load-system system :verbose nil))) ;; Finally, load asdf-tools (load-sys "asdf-tools")) ;;; asdf-tools is loaded, now actually run it! (restore-image :entry-point 'asdf-tools::entry-point :lisp-interaction nil)