meson-build-system: Return #t from all phases.

* guix/build/meson-build-system.scm (configure, build, check, install):
(fix-runpath): Use 'invoke' and return #t from all phases.
This commit is contained in:
Mark H Weaver 2018-06-25 18:53:49 -04:00
parent b6dc384a5a
commit 0e6cce2e01
No known key found for this signature in database
GPG Key ID: 7CEF29847562C516
1 changed files with 7 additions and 8 deletions

View File

@ -58,15 +58,14 @@
(mkdir build-dir) (mkdir build-dir)
(chdir build-dir) (chdir build-dir)
(zero? (apply system* "meson" args)))) (apply invoke "meson" args)))
(define* (build #:key parallel-build? (define* (build #:key parallel-build?
#:allow-other-keys) #:allow-other-keys)
"Build a given meson package." "Build a given meson package."
(zero? (apply system* "ninja" (invoke "ninja" "-j" (if parallel-build?
(if parallel-build? (number->string (parallel-job-count))
`("-j" ,(number->string (parallel-job-count))) "1")))
'("-j" "1")))))
(define* (check #:key test-target parallel-tests? tests? (define* (check #:key test-target parallel-tests? tests?
#:allow-other-keys) #:allow-other-keys)
@ -75,13 +74,13 @@
(number->string (parallel-job-count)) (number->string (parallel-job-count))
"1")) "1"))
(if tests? (if tests?
(zero? (system* "ninja" test-target)) (invoke "ninja" test-target)
(begin (begin
(format #t "test suite not run~%") (format #t "test suite not run~%")
#t))) #t)))
(define* (install #:rest args) (define* (install #:rest args)
(zero? (system* "ninja" "install"))) (invoke "ninja" "install"))
(define* (fix-runpath #:key (elf-directories '("lib" "lib64" "libexec" (define* (fix-runpath #:key (elf-directories '("lib" "lib64" "libexec"
"bin" "sbin")) "bin" "sbin"))
@ -135,7 +134,7 @@ for example libraries only needed for the tests."
(find-files dir elf-pred)) (find-files dir elf-pred))
existing-elf-dirs)))) existing-elf-dirs))))
(for-each (lambda (elf-file) (for-each (lambda (elf-file)
(system* "patchelf" "--shrink-rpath" elf-file) (invoke "patchelf" "--shrink-rpath" elf-file)
(handle-file elf-file elf-list)) (handle-file elf-file elf-list))
elf-list))))) elf-list)))))
(for-each handle-output outputs) (for-each handle-output outputs)