diff --git a/bin/asdf-builder b/bin/asdf-builder index a6f5bc067a4fe88b7bca76ba8caec5c4e5389fd4..cd616b254c9a7ac94822d66ae488283fc093df89 100755 --- a/bin/asdf-builder +++ b/bin/asdf-builder @@ -1,8 +1,34 @@ ":" ; exec sbcl --script "$0" "$@" ; exit # -*- Lisp -*- ;;;;; Really runs on any decent Common Lisp implementation -(load (make-pathname :name "prelude" :type "lisp" :defaults *load-pathname*) - :verbose nil :print nil) +(setf *load-verbose* nil *load-print* nil + *compile-verbose* nil *compile-print* nil) + +(format t "Loading your implementation's ASDF... ~%") +(ignore-errors (funcall 'require :asdf)) +(format t "~:[No ~;~]ASDF~:*~@[ ~A~] was provided~%" + (when (find-package :asdf) + (or (symbol-value (or (find-symbol (string :*asdf-version*) :asdf) + (find-symbol (string :*asdf-revision*) :asdf))) + (string :1.x)))) +#-asdf2 (load (merge-pathnames "../build/asdf.lisp" *load-pathname*)) +#-asdf2 (error "Not ASDF2, you lose!") + +(in-package :asdf) +(defparameter *provided-version* (asdf-version)) +(format t "Initializing the source registry... ~%") +(initialize-source-registry) +(format t "Upgrading to the latest ASDF... ~%") +(load-system :asdf) +(let ((ver (asdf-version))) + (if (equal ver *provided-version*) + (format t "Congratulations to your implementation for being up to date!~%") + (format t "Upgraded to ASDF ~A~%" ver))) +(format t "Now loading some dependencies... ~%") +(load-systems :cl-ppcre :fare-utils :inferior-shell) + +(format t "There we are!~%") +(restore-image) (defpackage :asdf-builder (:use :cl :uiop :asdf/operate :asdf :fare-utils :inferior-shell)) (in-package :asdf-builder) @@ -50,9 +76,9 @@ e)) (defun enough-namestrings (base pathnames) - (ensure-pathname base :want-absolute t :want-directory t) - (loop :for p :in pathnames - :collect (enough-namestring! p base))) + (loop :with b = (ensure-pathname base :want-absolute t :want-directory t) + :for p :in pathnames + :collect (enough-namestring! p b))) (defun system-source-files (system) (let* ((sys (find-system system)) @@ -112,8 +138,7 @@ (values))) (defun driver-files () - (DBG :df - (list* "uiop.asd" "asdf-driver.asd" (system-source-files :uiop)))) + (list* "uiop.asd" "asdf-driver.asd" (system-source-files :uiop))) (defun driver-name () (format nil "uiop-~A" *version*)) (defun make-driver-tarball () @@ -278,8 +303,8 @@ (build-asdf))) (defun git-version () - (first (run '("git" "describe" "--tags" "--match" "[0-9].[0-9][0-9]") :output :lines - :show t))) + (first (run '("git" "describe" "--tags" "--match" "[0-9].[0-9][0-9]") + :output :lines :show t))) ;;;; Main entry point diff --git a/bin/prelude.lisp b/bin/prelude.lisp deleted file mode 100644 index 2dcffec7ca08f393e534fa935e62cf17350f78e7..0000000000000000000000000000000000000000 --- a/bin/prelude.lisp +++ /dev/null @@ -1,29 +0,0 @@ -(setf *load-verbose* nil *load-print* nil - *compile-verbose* nil *compile-print* nil) - -(format t "Loading your implementation's ASDF... ~%") -(require :asdf) -(format t "~:[No ~;~]ASDF~:*~@[ ~A~] was provided~%" - (when (find-package :asdf) - (or (symbol-value (or (find-symbol (string :*asdf-version*) :asdf) - (find-symbol (string :*asdf-revision*) :asdf))) - (string :1.x)))) -#-asdf2 (load (merge-pathnames "../build/asdf.lisp" *load-pathname*)) -#-asdf2 (error "Not ASDF2, you lose!") - -(in-package :asdf) -(defparameter *provided-version* (asdf-version)) -(format t "Initializing the source registry... ~%") -(initialize-source-registry) -(format t "Upgrading to the latest ASDF... ~%") -(load-system :asdf) -(let ((ver (asdf-version))) - (if (equal ver *provided-version*) - (format t "Congratulations to your implementation for being up to date!~%") - (format t "Upgraded to ASDF ~A~%" ver))) -(format t "Now loading some dependencies... ~%") -(load-systems :cl-ppcre :fare-utils :inferior-shell) - -(format t "There we are!~%") -(restore-image) -