diff options
author | rillig <rillig@pkgsrc.org> | 2020-04-26 10:19:26 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-04-26 10:19:26 +0000 |
commit | 9db795e00553cbb62d58df3e8cba53bebbc369b1 (patch) | |
tree | 2342c11990b853644f29851eac302d2f6c35c6a5 | |
parent | 348242c03a0c47bf498c02a7ad3cbfd69a0802dd (diff) | |
download | pkgsrc-9db795e00553cbb62d58df3e8cba53bebbc369b1.tar.gz |
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.
-rw-r--r-- | lang/clang/Makefile.common | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lang/clang/Makefile.common b/lang/clang/Makefile.common index 829a9e0499c..4fa8a33f78d 100644 --- a/lang/clang/Makefile.common +++ b/lang/clang/Makefile.common @@ -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/hmaptool/hmaptool 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) |