summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-11-30 15:07:26 +0000
committerjlam <jlam>2004-11-30 15:07:26 +0000
commit38cc8b6fba9c4ae7609a794fc271faa08625714c (patch)
tree36bb765c692e0af82fc39ade039cb5d2322ef647 /mk
parent39200e2143ee445ca78b888be2ee31e86b7a33a1 (diff)
downloadpkgsrc-38cc8b6fba9c4ae7609a794fc271faa08625714c.tar.gz
Remove the trailing whitespace in the values of the toolchain variables
(CC, LD, CXX, etc.) if the default values have no arguments. Now, CC == "cc" and not "cc ".
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler.mk6
-rw-r--r--mk/wrapper/bsd.wrapper.mk6
2 files changed, 10 insertions, 2 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk
index 8d52e1a9a52..a979de1e28e 100644
--- a/mk/compiler.mk
+++ b/mk/compiler.mk
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.40 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: compiler.mk,v 1.41 2004/11/30 15:07:26 jlam Exp $
#
# This Makefile fragment implements handling for supported C/C++/Fortran
# compilers.
@@ -128,7 +128,11 @@ _COMPILER_STRIP_VARS= # empty
# the PATH to use the correct executable.
#
.for _var_ in ${_COMPILER_STRIP_VARS}
+. if empty(${_var_}:C/^/_asdf_/1:N_asdf_*)
+${_var_}:= ${${_var_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T}
+. else
${_var_}:= ${${_var_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T} ${${_var_}:C/^/_asdf_/1:N_asdf_*}
+. endif
.endfor
.if defined(ABI) && !empty(ABI)
diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk
index 8a9c9918039..fd41b787249 100644
--- a/mk/wrapper/bsd.wrapper.mk
+++ b/mk/wrapper/bsd.wrapper.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.13 2004/11/30 14:50:37 jlam Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.14 2004/11/30 15:07:26 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -154,7 +154,11 @@ _WRAPPEES_UNIQUE+= ${_wrappee_}
# Strip the leading paths from the toolchain variables since we manipulate
# the PATH to use the correct executable.
#
+. if empty(${_wrappee_}:C/^/_asdf_/1:N_asdf_*)
+${_wrappee_}:= ${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T}
+. else
${_wrappee_}:= ${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T} ${${_wrappee_}:C/^/_asdf_/1:N_asdf_*}
+. endif
#
# WRAPPER_<wrappee> is the full path to the wrapper script, plus any
# trailing arguments to <wrappee>.