From cf5a948845cad8de2bd32838b5160b0eb9c15eb2 Mon Sep 17 00:00:00 2001 From: rillig Date: Sun, 14 Jun 2020 11:19:34 +0000 Subject: lang/rust: fix unsatisfiable condition in cargo.mk The condition had been the same as in Makefile before 1.174. Testing for OPSYS was unnecessary since that is included in MACHINE_PLATFORM as well. The ${VAR} syntax is easier readable since the number of exclamation marks matches the number of negations, contrary to !empty, which is effectively a positive test. Swapped the order of the conditions since it is easier to read "generally, but not" than "not this and the general case". --- lang/rust/Makefile | 6 +++--- lang/rust/cargo.mk | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 0a034cdd164..a9ef332e6d5 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.177 2020/06/13 14:26:00 gdt Exp $ +# $NetBSD: Makefile,v 1.178 2020/06/14 11:19:34 rillig Exp $ DISTNAME= rustc-1.43.1-src PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} @@ -158,9 +158,9 @@ CONFIGURE_ARGS+= --set llvm.targets="ARM;X86" # # If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel. # \todo Consider avoiding setting this on netbsd-9 past the fix. -.if empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && !empty(MACHINE_PLATFORM:MNetBSD-[1-9].*) +. if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*} MAKE_JOBS_SAFE= no -.endif +. endif .endif # diff --git a/lang/rust/cargo.mk b/lang/rust/cargo.mk index 3a8ebbac98b..abba173d573 100644 --- a/lang/rust/cargo.mk +++ b/lang/rust/cargo.mk @@ -1,4 +1,4 @@ -# $NetBSD: cargo.mk,v 1.15 2020/06/08 22:37:28 he Exp $ +# $NetBSD: cargo.mk,v 1.16 2020/06/14 11:19:34 rillig Exp $ # # Common logic that can be used by packages that depend on cargo crates # from crates.io. This lets existing pkgsrc infrastructure fetch and verify @@ -42,8 +42,8 @@ EXTRACT_DIR.${_crate}.crate?= ${CARGO_VENDOR_DIR} .include "../../mk/bsd.prefs.mk" # Triggers NetBSD ld.so bug (PR toolchain/54192) -.if ${OPSYS} == "NetBSD" && !empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && \ - !empty(MACHINE_PLATFORM:MNetBSD-[1-9][0-9].*) +# See Makefile for further information. +.if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*} MAKE_JOBS_SAFE= no .endif -- cgit v1.2.3