diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-03 22:35:05 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-03 22:35:05 +0000 |
commit | 55f66ddd70d8c3ca1be82cec5a919aa1bed7f43f (patch) | |
tree | 624ec98fc58bd6cd81efc0bbc70142b61b9f1836 /mk/compiler | |
parent | 69e47a8c52987cc891c37b375a0db166abaf29da (diff) | |
download | pkgsrc-55f66ddd70d8c3ca1be82cec5a919aa1bed7f43f.tar.gz |
Reorder checks when setting _GCC_SUBPREFIX so that we always search for
the installed package first if _USE_PKGSRC_GCC is "yes".
Diffstat (limited to 'mk/compiler')
-rw-r--r-- | mk/compiler/gcc.mk | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 1cb0f5cf73b..867bd1e7988 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.23 2004/02/03 22:32:22 jlam Exp $ +# $NetBSD: gcc.mk,v 1.24 2004/02/03 22:35:05 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -199,18 +199,21 @@ PKG_SKIP_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}" # Ensure that the correct rpath is passed to the linker if we need to # link against gcc shared libs. # -. if !empty(_CC:M${LOCALBASE}/*) -_GCC_SUBPREFIX= ${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/ -. else _GCC_SUBPREFIX!= \ if ${PKG_INFO} -qe ${_GCC_PKGBASE}; then \ ${PKG_INFO} -f ${_GCC_PKGBASE} | \ ${GREP} "File:.*bin/gcc" | \ ${SED} -e "s/.*File: *//;s/bin\/gcc.*//;q"; \ else \ - ${ECHO} "not_found/"; \ + case ${_CC} in \ + ${LOCALBASE}/*) \ + ${ECHO} "${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/" ; \ + ;; \ + *) \ + ${ECHO} "not_found/"; \ + ;; \ + esac; \ fi -. endif _GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX} _GCC_ARCHDIR!= \ if [ -x ${_GCC_PREFIX}bin/gcc ]; then \ |