summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-01 17:32:03 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-02 15:56:22 +0200
commita1232d0cb886c96b721d3f83aefdbc921bd95bc3 (patch)
tree6ca45ef02d62ba5933c919686c8fd542ce0e0738 /guix/build
parent18a8dad70c2f285cb52ea53d4b33b2aa35592e21 (diff)
gnu-build-system: Improve the `configure' and `check' phases.
* guix/build/gnu-build-system.scm (configure): Print the final list of flags. (check): Add `tests?' keyword parameter.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/gnu-build-system.scm42
1 files changed, 25 insertions, 17 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index f82fa68b7a..6ee9afc845 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -57,27 +57,35 @@
(chdir (first-subdirectory "."))))
(define* (configure #:key outputs (configure-flags '()) #:allow-other-keys)
- (let ((prefix (assoc-ref outputs "out"))
- (libdir (assoc-ref outputs "lib"))
- (includedir (assoc-ref outputs "include")))
- (format #t "configure flags: ~s~%" configure-flags)
- (zero? (apply system* "./configure"
- "--enable-fast-install"
- (string-append "--prefix=" prefix)
- `(,@(if libdir
- (list (string-append "--libdir=" libdir "/lib"))
- '())
- ,@(if includedir
- (list (string-append "--includedir="
- includedir "/include"))
- '())
- ,@configure-flags)))))
+ (let* ((prefix (assoc-ref outputs "out"))
+ (libdir (assoc-ref outputs "lib"))
+ (includedir (assoc-ref outputs "include"))
+ (flags `(,(string-append "--prefix=" prefix)
+ "--enable-fast-install" ; when using Libtool
+
+ ;; Produce multiple outputs when specific output names
+ ;; are recognized.
+ ,@(if libdir
+ (list (string-append "--libdir=" libdir "/lib"))
+ '())
+ ,@(if includedir
+ (list (string-append "--includedir="
+ includedir "/include"))
+ '())
+ ,@configure-flags)))
+ (format #t "configure flags: ~s~%" flags)
+ (zero? (apply system* "./configure" flags))))
(define* (build #:key (make-flags '()) #:allow-other-keys)
(zero? (apply system* "make" make-flags)))
-(define* (check #:key (make-flags '()) #:allow-other-keys)
- (zero? (apply system* "make" "check" make-flags)))
+(define* (check #:key (make-flags '()) (tests? #t) (test-target "check")
+ #:allow-other-keys)
+ (if tests?
+ (zero? (apply system* "make" test-target make-flags))
+ (begin
+ (format #t "test suite not run~%")
+ #t)))
(define* (install #:key (make-flags '()) #:allow-other-keys)
(zero? (apply system* "make" "install" make-flags)))