pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/clang lang/clang: avoid unnecessary shell command
details: https://anonhg.NetBSD.org/pkgsrc/rev/71cafa613fe2
branches: trunk
changeset: 428249:71cafa613fe2
user: rillig <rillig%pkgsrc.org@localhost>
date: Sun Apr 26 10:19:26 2020 +0000
description:
lang/clang: avoid unnecessary shell command
The "echo NO" is not necessary since the output of the shell command is
immediately inspected. Therefore there is no need to use the :sh
modifier.
diffstat:
lang/clang/Makefile.common | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r f61ef6c40cb7 -r 71cafa613fe2 lang/clang/Makefile.common
--- a/lang/clang/Makefile.common Sun Apr 26 10:07:06 2020 +0000
+++ b/lang/clang/Makefile.common Sun Apr 26 10:19:26 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.42 2020/04/18 07:53:38 adam Exp $
+# $NetBSD: Makefile.common,v 1.43 2020/04/26 10:19:26 rillig Exp $
# used by lang/clang/Makefile
# used by lang/clang-static-analyzer/Makefile
# used by lang/clang-tools-extra/Makefile
@@ -69,15 +69,22 @@
REPLACE_PYTHON+= utils/token-delta.py
REPLACE_PYTHON+= www/builtins.py
-.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang)
+.if ${OPSYS} == "NetBSD" && ${PKGSRC_COMPILER:Mclang}
# command to check if clang is using libc++ or libstdc++
-LIBCPP_CHECK_SH= printf "\#include <ciso646>\n\#ifdef _LIBCPP_VERSION\nYES\n\#endif" | ${CLANGBASE}/bin/clang++ -x c++ -E - 2>&1 | grep YES || true
+LIBCPP_CHECK!= \
+ printf '%s\n' \
+ '\#include <ciso646>' \
+ '\#ifdef _LIBCPP_VERSION' \
+ 'YES' \
+ '\#endif' \
+ | ${CLANGBASE}/bin/clang++ -x c++ -E - 2>&1 \
+ | grep YES || true
.else
-LIBCPP_CHECK_SH= echo NO
+LIBCPP_CHECK= NO
.endif
# patch NetBSD::GetCXXStdlibType
-.if ${OPSYS} == "NetBSD" && empty(LIBCPP_CHECK_SH:sh:MYES)
+.if ${OPSYS} == "NetBSD" && ${LIBCPP_CHECK} == YES
SUBST_CLASSES+= libcxx
SUBST_STAGE.libcxx= pre-configure
SUBST_MESSAGE.libcxx= Patching toolchain to use libstdc++ (matching the host compiler)
Home |
Main Index |
Thread Index |
Old Index