Skip to content
Snippets Groups Projects
Commit a0dc95e6 authored by Robert Goldman's avatar Robert Goldman
Browse files

Merge branch 'master' of common-lisp.net:asdf/asdf

* 'master' of common-lisp.net:asdf/asdf:
  Tweak asdf-tools so it can be built by bazel
  Canonicalize system names to strings in asdf.asd
  Fix link to run-program.lisp
  ext: Update closer2mop. Also, tweak comment in make.sh
parents d0efa3d3 03df017f
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
(in-package :asdf) (in-package :asdf)
#+asdf3 #+asdf3
(defsystem :asdf/prelude (defsystem "asdf/prelude"
;; Note that it's polite to sort the defsystem forms in dependency order, ;; Note that it's polite to sort the defsystem forms in dependency order,
;; and compulsory to sort them in defsystem-depends-on order. ;; and compulsory to sort them in defsystem-depends-on order.
:version (:read-file-form "version.lisp-expr") :version (:read-file-form "version.lisp-expr")
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
((:file "header"))) ((:file "header")))
#+asdf3 #+asdf3
(defsystem :asdf/driver (defsystem "asdf/driver"
:depends-on (:uiop)) :depends-on ("uiop"))
#+asdf3 #+asdf3
(defsystem :asdf/defsystem (defsystem "asdf/defsystem"
:licence "MIT" :licence "MIT"
:description "The defsystem part of ASDF" :description "The defsystem part of ASDF"
:long-name "Another System Definition Facility" :long-name "Another System Definition Facility"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
:build-operation monolithic-concatenate-source-op :build-operation monolithic-concatenate-source-op
:build-pathname "build/asdf" ;; our target :build-pathname "build/asdf" ;; our target
:around-compile call-without-redefinition-warnings ;; we need be the same as uiop :around-compile call-without-redefinition-warnings ;; we need be the same as uiop
:depends-on (:asdf/prelude :asdf/driver) :depends-on ("asdf/prelude" "uiop")
:encoding :utf-8 :encoding :utf-8
:components :components
((:file "upgrade") ((:file "upgrade")
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
(:file "user" :depends-on ("interface")) (:file "user" :depends-on ("interface"))
(:file "footer" :depends-on ("user")))) (:file "footer" :depends-on ("user"))))
(defsystem :asdf (defsystem "asdf"
:author ("Daniel Barlow") :author ("Daniel Barlow")
:maintainer ("Robert Goldman") :maintainer ("Robert Goldman")
:licence "MIT" :licence "MIT"
...@@ -84,5 +84,5 @@ ...@@ -84,5 +84,5 @@
;; specify separate dependencies on uiop (aka asdf-driver) and asdf/defsystem. ;; specify separate dependencies on uiop (aka asdf-driver) and asdf/defsystem.
#+asdf3 :builtin-system-p #+asdf3 t #+asdf3 :builtin-system-p #+asdf3 t
:components ((:module "build" :components ((:file "asdf")))) :components ((:module "build" :components ((:file "asdf"))))
:in-order-to (#+asdf3 (prepare-op (monolithic-concatenate-source-op :asdf/defsystem)))) :in-order-to (#+asdf3 (prepare-op (monolithic-concatenate-source-op "asdf/defsystem"))))
Subproject commit 4bdfd472c06b6e14e55508405bbf3983c74f8414 Subproject commit 150d3e0e06ef7a734e97db440bccbf0cc7a73f61
...@@ -13,7 +13,7 @@ all () { ...@@ -13,7 +13,7 @@ all () {
build_asdf build_asdf
} }
build_asdf () { build_asdf () {
# That's the only thing that we really need before we may invoke asdf-builder. # That's the only thing that we really need before we may invoke asdf-tools.
mkdir -p build mkdir -p build
a=build/asdf.lisp a=build/asdf.lisp
cat ${header_lisp} ${driver_lisp} ${defsystem_lisp} > ${a}.tmp cat ${header_lisp} ${driver_lisp} ${defsystem_lisp} > ${a}.tmp
......
(in-package :asdf-tools) (in-package :asdf-tools)
;;; ASDF directory ;;; ASDF directory
(defvar *asdf-dir* (defun asdf-dir ()
(ensure-pathname (system-relative-pathname :asdf/defsystem ()) (ensure-pathname (system-relative-pathname :asdf/defsystem ())
:want-physical t :want-absolute t :want-physical t :want-absolute t
:want-existing t :truename t)) :want-existing t :truename t))
(defun pn (&rest x) (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) (defun nn (&rest x)
(native-namestring (apply 'pn x))) (native-namestring (apply 'pn x)))
(defvar *uiop-dir* (pn "uiop/")) (defun uiop-dir () (pn "uiop/"))
(defvar *build-dir* (pn "build/")) (defun build-dir () (pn "build/"))
(defun call-with-asdf-dir (thunk &rest subs) (defun call-with-asdf-dir (thunk &rest subs)
(with-current-directory ((apply 'pn subs)) (with-current-directory ((apply 'pn subs))
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
(destination (destination
(ensure-pathname (ensure-pathname
name name
:defaults *build-dir* :defaults (build-dir)
:want-relative t :ensure-absolute t :want-relative t :ensure-absolute t
:ensure-subpath t :ensure-directory t)) :ensure-subpath t :ensure-directory t))
(tarball (tarball
(ensure-pathname (ensure-pathname
(tarname name) (tarname name)
:defaults *build-dir* :defaults (build-dir)
:want-relative t :ensure-absolute t :want-relative t :ensure-absolute t
:ensure-subpath t :want-file t :ensure-subpath t :want-file t
:ensure-directories-exist t))) :ensure-directories-exist t)))
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
destination)) destination))
(ensure-directories-exist destination) (ensure-directories-exist destination)
(run* `(cp "-pHux" --parents ,@files ,destination) :directory base :show t) (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, ;; TODO: Have better autodetection for which tar is being used,
;; and fall back to no option if not recognized. ;; and fall back to no option if not recognized.
;; #+linux (* :owner root :group root) ;; assume GNU tar on Linux. ;; #+linux (* :owner root :group root) ;; assume GNU tar on Linux.
...@@ -73,9 +73,9 @@ ...@@ -73,9 +73,9 @@
"list files in uiop" "list files in uiop"
(list* "README.md" "uiop.asd" "asdf-driver.asd" (system-source-files "uiop"))) (list* "README.md" "uiop.asd" "asdf-driver.asd" (system-source-files "uiop")))
(defun uiop-name () (defun uiop-name ()
(format nil "uiop-~A" *version*)) (format nil "uiop-~A" (version-from-file)))
(deftestcmd make-uiop-tarball () (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 () (defun asdf-defsystem-files ()
"list files in asdf/defsystem" "list files in asdf/defsystem"
...@@ -83,22 +83,22 @@ ...@@ -83,22 +83,22 @@
"asdf.asd" "version.lisp-expr" "header.lisp" "asdf.asd" "version.lisp-expr" "header.lisp"
(system-source-files "asdf/defsystem"))) (system-source-files "asdf/defsystem")))
(defun asdf-defsystem-name () (defun asdf-defsystem-name ()
(format nil "asdf-defsystem-~A" *version*)) (format nil "asdf-defsystem-~A" (version-from-file)))
(deftestcmd make-asdf-defsystem-tarball () (deftestcmd make-asdf-defsystem-tarball ()
(build-asdf) (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 () (defun asdf-all-name ()
(strcat "asdf-" *version*)) (strcat "asdf-" (version-from-file)))
(defun asdf-all-files () (defun asdf-all-files ()
(remove-if #'(lambda (x) (string-prefix-p "ext/" x)) (remove-if #'(lambda (x) (string-prefix-p "ext/" x))
(with-asdf-dir () (run/lines '(git ls-files))))) (with-asdf-dir () (run/lines '(git ls-files)))))
(deftestcmd make-asdf-all-tarball () (deftestcmd make-asdf-all-tarball ()
(build-asdf) (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 () (defun asdf-lisp-name ()
(format nil "asdf-~A.lisp" *version*)) (format nil "asdf-~A.lisp" (version-from-file)))
(deftestcmd make-asdf-lisp () (deftestcmd make-asdf-lisp ()
(build-asdf) (build-asdf)
(concatenate-files (list (pn "build/asdf.lisp")) (concatenate-files (list (pn "build/asdf.lisp"))
......
...@@ -159,7 +159,7 @@ Use the preferred lisp implementation" ...@@ -159,7 +159,7 @@ Use the preferred lisp implementation"
(loop :for method :in upgrade-methods (loop :for method :in upgrade-methods
:for description :for description
= (format nil "Testing ASDF upgrade on ~(~A~) from ~A to ~A using method ~(~{~A~^:~}~)" = (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 :when (valid-upgrade-test-p lisp tag method) :do
(success-if (and (success-if (and
(extract-tagged-asdf tag) (extract-tagged-asdf tag)
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
(declare (ignore epoch)) (declare (ignore epoch))
(debian-version-string ver nil rel))) (debian-version-string ver nil rel)))
(defparameter *version* (version-from-file))
;;; Bumping the version of ASDF ;;; Bumping the version of ASDF
(defparameter *versioned-files* (defparameter *versioned-files*
......
...@@ -58,7 +58,7 @@ The files that constitute UIOP are, in dependency loading order: ...@@ -58,7 +58,7 @@ The files that constitute UIOP are, in dependency loading order:
printing backtraces, handling fatal conditions, using or avoiding debug modes, printing backtraces, handling fatal conditions, using or avoiding debug modes,
accessing command line arguments or quitting the process. accessing command line arguments or quitting the process.
* [run-program](program.lisp): portably spawns external processes and captures their output. * [run-program](run-program.lisp): portably spawns external processes and captures their output.
Can also capture error-output, inject input, or let it all be interactive. Can also capture error-output, inject input, or let it all be interactive.
* [lisp-build](lisp-build.lisp): portably compiles Common Lisp code, handles compilation results, * [lisp-build](lisp-build.lisp): portably compiles Common Lisp code, handles compilation results,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment