~ruther/guix-local

8897360fb367908c6972559b075f7c10810ae69b — Nicolas Graves 1 year, 3 months ago 9cd3b96
build-system: guile: Make #:documentation-file-regexp configurable.

* guix/build/guile-build-system.scm
  (install-documentation): Unset documentation-file-regexp keyword
  default.
  (%documentation-file-regexp): Move variable to...
* guix/build-system/guile.scm
  (%documentation-file-regexp): New variable.
  (guile-build, guile-cross-build): Use it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2 files changed, 9 insertions(+), 7 deletions(-)

M guix/build-system/guile.scm
M guix/build/guile-build-system.scm
M guix/build-system/guile.scm => guix/build-system/guile.scm +8 -0
@@ 33,6 33,10 @@
  ;; Regexp to match Scheme files.
  "\\.(scm|sls)$")

(define %documentation-file-regexp
  ;; Regexp to match README files and the likes.
  "^(README.*|.*\\.html|.*\\.org|.*\\.md)$")

(define %guile-build-system-modules
  ;; Build-side modules imported by default.
  `((guix build guile-build-system)


@@ 85,6 89,7 @@
                      (source-directory ".")
                      not-compiled-file-regexp
                      (scheme-file-regexp %scheme-file-regexp)
                      (documentation-file-regexp %documentation-file-regexp)
                      ;; FIXME: Turn on parallel building of Guile modules by
                      ;; default after the non-determinism issues in the Guile byte
                      ;; compiler are resolved (see bug #20272).


@@ 104,6 109,7 @@
                       #:source #+source
                       #:source-directory #$source-directory
                       #:scheme-file-regexp #$scheme-file-regexp
                       #:documentation-file-regexp #$documentation-file-regexp
                       #:not-compiled-file-regexp #$not-compiled-file-regexp
                       #:parallel-build? #$parallel-build?
                       #:compile-flags #$compile-flags


@@ 136,6 142,7 @@
                            (phases '%standard-phases)
                            (source-directory ".")
                            (scheme-file-regexp %scheme-file-regexp)
                            (documentation-file-regexp %documentation-file-regexp)
                            not-compiled-file-regexp
                            ;; FIXME: Turn on parallel building of Guile
                            ;; modules by default after the non-determinism


@@ 169,6 176,7 @@
                       #:source-directory #$source-directory
                       #:scheme-file-regexp #$scheme-file-regexp
                       #:not-compiled-file-regexp #$not-compiled-file-regexp
                       #:documentation-file-regexp #$documentation-file-regexp
                       #:parallel-build? #$parallel-build?
                       #:compile-flags #$compile-flags
                       #:inputs %build-target-inputs

M guix/build/guile-build-system.scm => guix/build/guile-build-system.scm +1 -7
@@ 66,10 66,6 @@ determined."
  ;; Regexp to match Scheme files.
  "\\.(scm|sls)$")

(define %documentation-file-regexp
  ;; Regexp to match README files and the likes.
  "^(README.*|.*\\.html|.*\\.org|.*\\.md)$")

(define* (set-locale-path #:key inputs native-inputs
                          #:allow-other-keys)
  "Set 'GUIX_LOCPATH'."


@@ 212,9 208,7 @@ installed; this is useful for files that are meant to be included."
       #:max-processes (if parallel-build? (parallel-job-count) 1)
       #:report-progress report-build-progress))))

(define* (install-documentation #:key outputs
                                (documentation-file-regexp
                                 %documentation-file-regexp)
(define* (install-documentation #:key outputs documentation-file-regexp
                                #:allow-other-keys)
  "Install files that match DOCUMENTATION-FILE-REGEXP."
  (let* ((out (assoc-ref outputs "out"))