summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-04 23:10:19 +0000
committerjlam <jlam@pkgsrc.org>2004-02-04 23:10:19 +0000
commit3e017ffa31593c80a4916a37ec9a3f897eb8760b (patch)
tree94aad4db22e5c19289a750e5e121d9f66ee7daa0 /mk/compiler
parentc3a00f8062a97223b9539089db07b999c03931d8 (diff)
downloadpkgsrc-3e017ffa31593c80a4916a37ec9a3f897eb8760b.tar.gz
Try to avoid "/" as the _GCC_SUBPREFIX.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gcc.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 02926a99371..d8a722e559a 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.28 2004/02/04 22:33:18 jlam Exp $
+# $NetBSD: gcc.mk,v 1.29 2004/02/04 23:10:19 jlam Exp $
.if !defined(COMPILER_GCC_MK)
COMPILER_GCC_MK= defined
@@ -210,7 +210,11 @@ _GCC_SUBPREFIX!= \
else \
case ${_CC} in \
${LOCALBASE}/*) \
- ${ECHO} "${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/" ; \
+ subprefix="${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}"; \
+ case "$${subprefix}" in \
+ "") ${ECHO} "$${subprefix}"; \
+ *) ${ECHO} "$${subprefix}/; \
+ esac; \
;; \
*) \
${ECHO} "_GCC_SUBPREFIX_not_found/"; \