mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-08 07:56:16 -05:00
build-system/copy: Avoid use of 'set!'.
This fixes the copy-build-system on powerpc-linux. * guix/build/copy-build-system.scm (install)[install]: Don't clobber 'target' variable and move variable assignation into the let statement.
This commit is contained in:
parent
145eba0965
commit
d7653761d3
1 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
|
||||
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -133,8 +134,8 @@ (define* (install-file-list source target #:key include exclude include-regexp e
|
|||
file-list))))
|
||||
|
||||
(define* (install source target #:key include exclude include-regexp exclude-regexp)
|
||||
(set! target (string-append (assoc-ref outputs "out") "/" target))
|
||||
(let ((filters? (or include exclude include-regexp exclude-regexp)))
|
||||
(let ((final-target (string-append (assoc-ref outputs "out") "/" target))
|
||||
(filters? (or include exclude include-regexp exclude-regexp)))
|
||||
(when (and (not (file-is-directory? source))
|
||||
filters?)
|
||||
(error "Cannot use filters when SOURCE is a file."))
|
||||
|
@ -143,12 +144,12 @@ (define* (install source target #:key include exclude include-regexp exclude-reg
|
|||
(and (file-is-directory? source)
|
||||
filters?))))
|
||||
(if multi-files-in-source?
|
||||
(install-file-list source target
|
||||
(install-file-list source final-target
|
||||
#:include include
|
||||
#:exclude exclude
|
||||
#:include-regexp include-regexp
|
||||
#:exclude-regexp exclude-regexp)
|
||||
(install-simple source target)))))
|
||||
(install-simple source final-target)))))
|
||||
|
||||
(for-each (lambda (plan) (apply install plan)) install-plan)
|
||||
#t)
|
||||
|
|
Loading…
Reference in a new issue