build-system/gnu: Add 'delete-info-dir-file' phase.

* guix/build/gnu-build-system.scm (delete-info-dir-file): New procedure.
  (%standard-phases): Use it.
This commit is contained in:
Federico Beffa 2015-04-05 21:59:18 +02:00
parent 1b85e57f11
commit 26b261ecfe
1 changed files with 10 additions and 0 deletions

View File

@ -538,6 +538,15 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
(format #t "not compressing documentation~%") (format #t "not compressing documentation~%")
#t))) #t)))
(define* (delete-info-dir-file #:key outputs #:allow-other-keys)
(for-each (match-lambda
((output . directory)
(let ((info-dir-file (string-append directory "/share/info/dir")))
(when (file-exists? info-dir-file)
(delete-file info-dir-file)))))
outputs)
#t)
(define %standard-phases (define %standard-phases
;; Standard build phases, as a list of symbol/procedure pairs. ;; Standard build phases, as a list of symbol/procedure pairs.
(let-syntax ((phases (syntax-rules () (let-syntax ((phases (syntax-rules ()
@ -549,6 +558,7 @@ DOCUMENTATION-COMPRESSOR-FLAGS."
patch-shebangs strip patch-shebangs strip
validate-runpath validate-runpath
validate-documentation-location validate-documentation-location
delete-info-dir-file
compress-documentation))) compress-documentation)))