12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- (define-module (guix build gnu-dist)
- #:use-module (guix build utils)
- #:use-module (guix build gnu-build-system)
- #:use-module (srfi srfi-1)
- #:export (%dist-phases))
- (define* (build #:key build-before-dist? make-flags (dist-target "distcheck")
- #:allow-other-keys
- #:rest args)
- (when build-before-dist?
- (let ((build (assq-ref %standard-phases 'build)))
- (apply build args)))
- (format #t "building target `~a'~%" dist-target)
- (apply invoke "make" dist-target make-flags))
- (define* (install-dist #:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (for-each (lambda (tarball)
- (install-file tarball out))
- (find-files "." "\\.tar\\."))
- #t))
- (define %dist-phases
-
- (modify-phases %standard-phases
- (delete 'strip)
- (replace 'install install-dist)
- (add-after 'build 'build-dist build)
- (delete 'build)))
|