build-system/scons: Use invoke instead of system*.
* guix/build/scons-build-system.scm (build, check, install): Use invoke.
This commit is contained in:
parent
68ca0efa9a
commit
2eeffc0acc
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
|
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -31,24 +32,23 @@
|
||||||
(define* (build #:key outputs (scons-flags '()) (parallel-build? #t) #:allow-other-keys)
|
(define* (build #:key outputs (scons-flags '()) (parallel-build? #t) #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(mkdir-p out)
|
(mkdir-p out)
|
||||||
(zero? (apply system* "scons"
|
(apply invoke "scons"
|
||||||
(append (if parallel-build?
|
(append (if parallel-build?
|
||||||
(list "-j" (number->string
|
(list "-j" (number->string
|
||||||
(parallel-job-count)))
|
(parallel-job-count)))
|
||||||
(list))
|
(list))
|
||||||
scons-flags)))))
|
scons-flags))))
|
||||||
|
|
||||||
(define* (check #:key tests? test-target (scons-flags '()) #:allow-other-keys)
|
(define* (check #:key tests? test-target (scons-flags '()) #:allow-other-keys)
|
||||||
"Run the test suite of a given SCons application."
|
"Run the test suite of a given SCons application."
|
||||||
(cond (tests?
|
(if tests?
|
||||||
(zero? (apply system* "scons" test-target scons-flags)))
|
(apply invoke "scons" test-target scons-flags)
|
||||||
(else
|
(format #t "test suite not run~%"))
|
||||||
(format #t "test suite not run~%")
|
#t)
|
||||||
#t)))
|
|
||||||
|
|
||||||
(define* (install #:key outputs (scons-flags '()) #:allow-other-keys)
|
(define* (install #:key outputs (scons-flags '()) #:allow-other-keys)
|
||||||
"Install a given SCons application."
|
"Install a given SCons application."
|
||||||
(zero? (apply system* "scons" "install" scons-flags)))
|
(apply invoke "scons" "install" scons-flags))
|
||||||
|
|
||||||
(define %standard-phases
|
(define %standard-phases
|
||||||
(modify-phases gnu:%standard-phases
|
(modify-phases gnu:%standard-phases
|
||||||
|
|
Loading…
Reference in New Issue