summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2019-09-18 06:15:13 +0000
committerrillig <rillig@pkgsrc.org>2019-09-18 06:15:13 +0000
commit71aa0faa7ac756cf2ed0382f7ed1a155a4e9bebc (patch)
treeafb55fe773370a628cc7f97f7722508f63eaf81a /mk
parentdf2155198bca4216ae55e0ef365322afdf0c0277 (diff)
downloadpkgsrc-71aa0faa7ac756cf2ed0382f7ed1a155a4e9bebc.tar.gz
mk/compiler: replace complicated :M_asdf_ modifier with :[1]
The :[1] modifier has been added to bmake in 2006.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/gcc.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index a83dddc2b39..9454375862c 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.204 2019/09/08 09:24:52 rillig Exp $
+# $NetBSD: gcc.mk,v 1.205 2019/09/18 06:15:13 rillig Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -187,14 +187,14 @@ _GCC_AUX_PATTERNS= 20[1-2][0-9][0-1][0-9][0-3][0-9]*
# _CC is the full path to the compiler named by ${CC} if it can be found.
.if !defined(_CC)
-_CC:= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+_CC:= ${CC:[1]}
. if !empty(GCCBASE) && exists(${GCCBASE}/bin)
_EXTRA_CC_DIRS= ${GCCBASE}/bin
. endif
. for _dir_ in ${_EXTRA_CC_DIRS} ${PATH:C/\:/ /g}
. if empty(_CC:M/*)
-. if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//})
-_CC:= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+. if exists(${_dir_}/${CC:[1]})
+_CC:= ${_dir_}/${CC:[1]}
. endif
. endif
. endfor