mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 12:39:36 -05:00
utils: Preserve makefile shell arguments during patch.
* guix/build/utils.scm (patch-makefile-SHELL): Preserve shell arguments.
This commit is contained in:
parent
f5beb0caf3
commit
83291101c3
1 changed files with 3 additions and 2 deletions
|
@ -582,14 +582,15 @@ (define (find-shell name)
|
|||
|
||||
(let ((st (stat file)))
|
||||
(substitute* file
|
||||
(("^ *SHELL[[:blank:]]*=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)[[:blank:]]*" _ dir shell)
|
||||
(("^ *SHELL[[:blank:]]*=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)[[:blank:]]*(.*)$"
|
||||
_ dir shell args)
|
||||
(let* ((old (string-append dir shell))
|
||||
(new (or (find-shell shell) old)))
|
||||
(unless (string=? new old)
|
||||
(format (current-error-port)
|
||||
"patch-makefile-SHELL: ~a: changing `SHELL' from `~a' to `~a'~%"
|
||||
file old new))
|
||||
(string-append "SHELL = " new "\n"))))
|
||||
(string-append "SHELL = " new " " args))))
|
||||
|
||||
(when keep-mtime?
|
||||
(set-file-time file st))))
|
||||
|
|
Loading…
Reference in a new issue