pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler Reorder checks when setting _GCC_SUBPREFIX...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/511f9aa87061
branches:  trunk
changeset: 467610:511f9aa87061
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Feb 03 22:35:05 2004 +0000

description:
Reorder checks when setting _GCC_SUBPREFIX so that we always search for
the installed package first if _USE_PKGSRC_GCC is "yes".

diffstat:

 mk/compiler/gcc.mk |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r 72066cccd6ed -r 511f9aa87061 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Tue Feb 03 22:32:22 2004 +0000
+++ b/mk/compiler/gcc.mk        Tue Feb 03 22:35:05 2004 +0000
@@ -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 @@
 # 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                           \



Home | Main Index | Thread Index | Old Index