mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 03:20:04 +01:00
build-system/asdf: Adopt asdf conventions.
The asdf documentation specifies that asdf:load-asd should be preferred to calling load on a system definition file. * guix/build/lisp-utils.scm (compile-system): Replace load with asdf:load-asd. (system-dependencies): Likewise. (test-system): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
e831a1668b
commit
5f6908d664
1 changed files with 14 additions and 17 deletions
|
@ -152,8 +152,7 @@ with PROGRAM."
|
||||||
first."
|
first."
|
||||||
(lisp-eval-program
|
(lisp-eval-program
|
||||||
`((require :asdf)
|
`((require :asdf)
|
||||||
(let ((*package* (find-package :asdf)))
|
(asdf:load-asd (truename ,asd-file) :name ,(normalize-string system))
|
||||||
(load ,asd-file))
|
|
||||||
(asdf:operate 'asdf:compile-bundle-op ,system))))
|
(asdf:operate 'asdf:compile-bundle-op ,system))))
|
||||||
|
|
||||||
(define (system-dependencies system asd-file)
|
(define (system-dependencies system asd-file)
|
||||||
|
@ -162,8 +161,7 @@ asdf:system-depends-on. First load the system's ASD-FILE."
|
||||||
(define deps-file ".deps.sexp")
|
(define deps-file ".deps.sexp")
|
||||||
(define program
|
(define program
|
||||||
`((require :asdf)
|
`((require :asdf)
|
||||||
(let ((*package* (find-package :asdf)))
|
(asdf:load-asd (truename ,asd-file) :name ,(normalize-string system))
|
||||||
(load ,asd-file))
|
|
||||||
(with-open-file
|
(with-open-file
|
||||||
(stream ,deps-file :direction :output)
|
(stream ,deps-file :direction :output)
|
||||||
(format stream
|
(format stream
|
||||||
|
@ -203,19 +201,18 @@ asdf:system-depends-on. First load the system's ASD-FILE."
|
||||||
Also load TEST-ASD-FILE if necessary."
|
Also load TEST-ASD-FILE if necessary."
|
||||||
(lisp-eval-program
|
(lisp-eval-program
|
||||||
`((require :asdf)
|
`((require :asdf)
|
||||||
(let ((*package* (find-package :asdf)))
|
(asdf:load-asd (truename ,asd-file) :name ,(normalize-string system))
|
||||||
(load ,asd-file)
|
,@(if test-asd-file
|
||||||
,@(if test-asd-file
|
`((asdf:load-asd (truename ,test-asd-file)))
|
||||||
`((load ,test-asd-file))
|
;; Try some likely files.
|
||||||
;; Try some likely files.
|
(map (lambda (file)
|
||||||
(map (lambda (file)
|
`(when (uiop:file-exists-p ,file)
|
||||||
`(when (uiop:file-exists-p ,file)
|
(asdf:load-asd (truename ,file))))
|
||||||
(load ,file)))
|
(list
|
||||||
(list
|
(string-append system "-tests.asd")
|
||||||
(string-append system "-tests.asd")
|
(string-append system "-test.asd")
|
||||||
(string-append system "-test.asd")
|
"tests.asd"
|
||||||
"tests.asd"
|
"test.asd")))
|
||||||
"test.asd"))))
|
|
||||||
(asdf:test-system ,system))))
|
(asdf:test-system ,system))))
|
||||||
|
|
||||||
(define (string->lisp-keyword . strings)
|
(define (string->lisp-keyword . strings)
|
||||||
|
|
Loading…
Add table
Reference in a new issue