diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-02 12:44:22 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-02 12:44:22 +0000 |
commit | a8fa1078e7024e348facd22ee73dca826545ecaa (patch) | |
tree | b603f8d8a8866651f7bdba7cf0b609c3a176503e /mk/compiler | |
parent | 67d464d2255e2fcc2dbff017b7d2097bb30d6a08 (diff) | |
download | pkgsrc-a8fa1078e7024e348facd22ee73dca826545ecaa.tar.gz |
If we can't find the package using pkg_info, then use a simple heuristic
to figure out _GCC_SUBPREFIX.
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index f2d5242fa26..8137cc19af2 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.11 2004/02/02 12:27:12 jlam Exp $ +# $NetBSD: gcc.mk,v 1.12 2004/02/02 12:44:22 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -174,7 +174,15 @@ _GCC_SUBPREFIX!= \ ${GREP} "File:.*bin/gcc" | \ ${SED} -e "s/.*File: *//;s/bin\/gcc.*//;q"; \ else \ - ${ECHO} "not_found/"; \ + gccpath="`${TYPE} ${CC} | ${AWK} '{ print $$NF }'`"; \ + case $$gccpath in \ + ${LOCALBASE}/*) \ + ${ECHO} "`${BASENAME} $$gccpath`/"; \ + ;; \ + *) \ + ${ECHO} "not_found/"; \ + ;; \ + esac fi _GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX} _GCC_ARCHDIR!= \ |