diff --git a/tools/pathnames.lisp b/tools/pathnames.lisp index 2309d0a578597ed2300863c6ceafb0e8dc395db7..fafb750760b2ba7b4202f145ae704092b2dce5bc 100644 --- a/tools/pathnames.lisp +++ b/tools/pathnames.lisp @@ -1,18 +1,18 @@ (in-package :asdf-tools) ;;; ASDF directory -(defvar *asdf-dir* +(defun asdf-dir () (ensure-pathname (system-relative-pathname :asdf/defsystem ()) :want-physical t :want-absolute t :want-existing t :truename t)) (defun pn (&rest x) - (subpathname *asdf-dir* (and x (uiop:resolve-relative-location x)))) + (subpathname (asdf-dir) (and x (uiop:resolve-relative-location x)))) (defun nn (&rest x) (native-namestring (apply 'pn x))) -(defvar *uiop-dir* (pn "uiop/")) -(defvar *build-dir* (pn "build/")) +(defun uiop-dir () (pn "uiop/")) +(defun build-dir () (pn "build/")) (defun call-with-asdf-dir (thunk &rest subs) (with-current-directory ((apply 'pn subs)) diff --git a/tools/release.lisp b/tools/release.lisp index d78d67a113107572a66e57777c22a54bd8ecbb16..c481c591bf5b075b56859f896034c7b50aa647c8 100644 --- a/tools/release.lisp +++ b/tools/release.lisp @@ -44,13 +44,13 @@ (destination (ensure-pathname name - :defaults *build-dir* + :defaults (build-dir) :want-relative t :ensure-absolute t :ensure-subpath t :ensure-directory t)) (tarball (ensure-pathname (tarname name) - :defaults *build-dir* + :defaults (build-dir) :want-relative t :ensure-absolute t :ensure-subpath t :want-file t :ensure-directories-exist t))) @@ -60,7 +60,7 @@ destination)) (ensure-directories-exist destination) (run* `(cp "-pHux" --parents ,@files ,destination) :directory base :show t) - (run* `(tar "zcf" ,tarball "-C" ,*build-dir* + (run* `(tar "zcf" ,tarball "-C" ,(build-dir) ;; TODO: Have better autodetection for which tar is being used, ;; and fall back to no option if not recognized. ;; #+linux (* :owner root :group root) ;; assume GNU tar on Linux. @@ -73,9 +73,9 @@ "list files in uiop" (list* "README.md" "uiop.asd" "asdf-driver.asd" (system-source-files "uiop"))) (defun uiop-name () - (format nil "uiop-~A" *version*)) + (format nil "uiop-~A" (version-from-file))) (deftestcmd make-uiop-tarball () - (make-tarball-under-build (uiop-name) *uiop-dir* (uiop-files))) + (make-tarball-under-build (uiop-name) (uiop-dir) (uiop-files))) (defun asdf-defsystem-files () "list files in asdf/defsystem" @@ -83,22 +83,22 @@ "asdf.asd" "version.lisp-expr" "header.lisp" (system-source-files "asdf/defsystem"))) (defun asdf-defsystem-name () - (format nil "asdf-defsystem-~A" *version*)) + (format nil "asdf-defsystem-~A" (version-from-file))) (deftestcmd make-asdf-defsystem-tarball () (build-asdf) - (make-tarball-under-build (asdf-defsystem-name) *asdf-dir* (asdf-defsystem-files))) + (make-tarball-under-build (asdf-defsystem-name) (asdf-dir) (asdf-defsystem-files))) (defun asdf-all-name () - (strcat "asdf-" *version*)) + (strcat "asdf-" (version-from-file))) (defun asdf-all-files () (remove-if #'(lambda (x) (string-prefix-p "ext/" x)) (with-asdf-dir () (run/lines '(git ls-files))))) (deftestcmd make-asdf-all-tarball () (build-asdf) - (make-tarball-under-build (asdf-all-name) *asdf-dir* (asdf-all-files))) + (make-tarball-under-build (asdf-all-name) (asdf-dir) (asdf-all-files))) (defun asdf-lisp-name () - (format nil "asdf-~A.lisp" *version*)) + (format nil "asdf-~A.lisp" (version-from-file))) (deftestcmd make-asdf-lisp () (build-asdf) (concatenate-files (list (pn "build/asdf.lisp")) diff --git a/tools/test-upgrade.lisp b/tools/test-upgrade.lisp index 13def37b155180cc7237241397f01e4c5a57b729..08757b75d91154bd0777d3dc3c8fd03c12184d11 100644 --- a/tools/test-upgrade.lisp +++ b/tools/test-upgrade.lisp @@ -159,7 +159,7 @@ Use the preferred lisp implementation" (loop :for method :in upgrade-methods :for description = (format nil "Testing ASDF upgrade on ~(~A~) from ~A to ~A using method ~(~{~A~^:~}~)" - lisp tag *version* method) + lisp tag (version-from-file) method) :when (valid-upgrade-test-p lisp tag method) :do (success-if (and (extract-tagged-asdf tag) diff --git a/tools/version.lisp b/tools/version.lisp index 5e60b4c2c60a534d123b83ec63c0576b56fb9db6..19d2e066a7d153ffd59c5d260383f62a6565a6a7 100644 --- a/tools/version.lisp +++ b/tools/version.lisp @@ -37,8 +37,6 @@ (declare (ignore epoch)) (debian-version-string ver nil rel))) -(defparameter *version* (version-from-file)) - ;;; Bumping the version of ASDF (defparameter *versioned-files*