[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/07: utils: 'target-arm32?' & co. take an optional parameter.
From: |
guix-commits |
Subject: |
04/07: utils: 'target-arm32?' & co. take an optional parameter. |
Date: |
Fri, 15 May 2020 18:34:53 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 300a54bb984b92a36b68d7a672f2e11aa3dd2af1
Author: Ludovic Courtès <address@hidden>
AuthorDate: Fri May 15 22:22:03 2020 +0200
utils: 'target-arm32?' & co. take an optional parameter.
* guix/utils.scm (target-arm32?, target-aarch64?)
(target-arm?, target-64bit?): Make 'target' an optional parameter.
---
guix/utils.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/guix/utils.scm b/guix/utils.scm
index 3e8e59b..d7b197f 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -490,18 +490,21 @@ a character other than '@'."
(and target
(string-suffix? "-mingw32" target)))
-(define (target-arm32?)
- (string-prefix? "arm" (or (%current-target-system) (%current-system))))
+(define* (target-arm32? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "arm" target))
-(define (target-aarch64?)
- (string-prefix? "aarch64" (or (%current-target-system) (%current-system))))
+(define* (target-aarch64? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (string-prefix? "aarch64" target))
-(define (target-arm?)
- (or (target-arm32?) (target-aarch64?)))
+(define* (target-arm? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (or (target-arm32? target) (target-aarch64? target)))
-(define (target-64bit?)
- (let ((system (or (%current-target-system) (%current-system))))
- (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64"
"ppc64"))))
+(define* (target-64bit? #:optional (system (or (%current-target-system)
+ (%current-system))))
+ (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
(define version-compare
(let ((strverscmp
- branch master updated (a7b2022 -> 408ae72), guix-commits, 2020/05/15
- 01/07: bootloader: grub: Refer to the native 'grub-mklayout' and font file., guix-commits, 2020/05/15
- 03/07: gexp: Add 'let-system'., guix-commits, 2020/05/15
- 04/07: utils: 'target-arm32?' & co. take an optional parameter.,
guix-commits <=
- 07/07: services: shepherd: Silence Guile warnings., guix-commits, 2020/05/15
- 06/07: linux-initrd: Silence Guile warnings., guix-commits, 2020/05/15
- 05/07: vm: Use 'let-system'., guix-commits, 2020/05/15
- 02/07: gexp: Compilers can now return lowerable objects., guix-commits, 2020/05/15