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

Fold prelude.lisp into asdf-builder, since it's the only script left to use it.

parent 75eab15d
":" ; 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
......
(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)
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