build-system/perl: Use invoke instead of system*.

* guix/build/perl-build-system.scm (configure, build, check, install): Use
invoke.
This commit is contained in:
Mark H Weaver 2018-03-16 03:22:48 -04:00
parent 0f308fe8eb
commit 9e58fd9d7b
No known key found for this signature in database
GPG Key ID: 7CEF29847562C516
1 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2015, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2015, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -49,7 +50,7 @@
"INSTALLDIRS=site" "NO_PERLLOCAL=1" ,@make-maker-flags)) "INSTALLDIRS=site" "NO_PERLLOCAL=1" ,@make-maker-flags))
(else (error "no Build.PL or Makefile.PL found"))))) (else (error "no Build.PL or Makefile.PL found")))))
(format #t "running `perl' with arguments ~s~%" args) (format #t "running `perl' with arguments ~s~%" args)
(zero? (apply system* "perl" args)))) (apply invoke "perl" args)))
(define-syntax-rule (define-w/gnu-fallback* (name args ...) body ...) (define-syntax-rule (define-w/gnu-fallback* (name args ...) body ...)
(define* (name args ... #:rest rest) (define* (name args ... #:rest rest)
@ -58,19 +59,18 @@
(apply (assoc-ref gnu:%standard-phases 'name) rest)))) (apply (assoc-ref gnu:%standard-phases 'name) rest))))
(define-w/gnu-fallback* (build) (define-w/gnu-fallback* (build)
(zero? (system* "./Build"))) (invoke "./Build"))
(define-w/gnu-fallback* (check #:key target (define-w/gnu-fallback* (check #:key target
(tests? (not target)) (test-flags '()) (tests? (not target)) (test-flags '())
#:allow-other-keys) #:allow-other-keys)
(if tests? (if tests?
(zero? (apply system* "./Build" "test" test-flags)) (apply invoke "./Build" "test" test-flags)
(begin (format #t "test suite not run~%"))
(format #t "test suite not run~%") #t)
#t)))
(define-w/gnu-fallback* (install) (define-w/gnu-fallback* (install)
(zero? (system* "./Build" "install"))) (invoke "./Build" "install"))
(define %standard-phases (define %standard-phases
;; Everything is as with the GNU Build System except for the `configure', ;; Everything is as with the GNU Build System except for the `configure',