pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler Reorder sections a bit so that related sec...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9ae95599f543
branches:  trunk
changeset: 467602:9ae95599f543
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Feb 03 21:48:14 2004 +0000

description:
Reorder sections a bit so that related sections are together.

diffstat:

 mk/compiler/gcc.mk |  96 ++++++++++++++++++++++++++---------------------------
 1 files changed, 47 insertions(+), 49 deletions(-)

diffs (133 lines):

diff -r ad50738dc8e6 -r 9ae95599f543 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Tue Feb 03 21:30:26 2004 +0000
+++ b/mk/compiler/gcc.mk        Tue Feb 03 21:48:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.18 2004/02/03 21:30:26 jlam Exp $
+# $NetBSD: gcc.mk,v 1.19 2004/02/03 21:48:14 jlam Exp $
 
 .if !defined(COMPILER_GCC_MK)
 COMPILER_GCC_MK=       defined
@@ -18,34 +18,6 @@
 _GCC3_PATTERNS=        2.95.[4-9]* 2.95.[1-9][0-9]* 2.9[6-9] 2.9[6-9].*        \
                2.[1-9][0-9][0-9]* 3.* [4-9]*
 
-_CC=   ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-.for _dir_ in ${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_//}
-.    endif
-.  endif
-.endfor
-
-.if !empty(_CC:M${LOCALBASE}/*)
-_IS_BUILTIN_GCC=       NO
-.else
-.  if !empty(_CC:M/*)
-#
-# GCC in older versions of Darwin report "Apple Computer ... based on gcc
-# version ...", so we can't just grep for "^gcc".
-#
-_IS_BUILTIN_GCC!=      \
-       if ${_CC} -v 2>&1 | ${GREP} -q "gcc version"; then      \
-               ${ECHO} "YES";                                          \
-       else                                                            \
-               ${ECHO} "NO";                                           \
-       fi
-.  else
-_IS_BUILTIN_GCC=       NO
-.  endif
-.endif
-
 # Distill the GCC_REQD list into a single _GCC_REQD value that is the
 # highest version of GCC required.
 #
@@ -153,6 +125,34 @@
 _USE_PKGSRC_GCC=       NO
 .endif
 
+_CC=   ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+.for _dir_ in ${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_//}
+.    endif
+.  endif
+.endfor
+
+.if !empty(_CC:M${LOCALBASE}/*)
+_IS_BUILTIN_GCC=       NO
+.else
+.  if !empty(_CC:M/*)
+#
+# GCC in older versions of Darwin report "Apple Computer ... based on gcc
+# version ...", so we can't just grep for "^gcc".
+#
+_IS_BUILTIN_GCC!=      \
+       if ${_CC} -v 2>&1 | ${GREP} -q "gcc version"; then      \
+               ${ECHO} "YES";                                          \
+       else                                                            \
+               ${ECHO} "NO";                                           \
+       fi
+.  else
+_IS_BUILTIN_GCC=       NO
+.  endif
+.endif
+
 .if !defined(_USE_PKGSRC_GCC)
 .  if !empty(_IS_BUILTIN_GCC:M[nN][oO])
 _USE_PKGSRC_GCC=       YES
@@ -176,6 +176,24 @@
 .  endif
 .endif
 
+# Check if any of the versions of GCC in pkgsrc can satisfy the _GCC_REQD
+# requirement.
+#
+.if !defined(_NEED_NEWER_GCC)
+_PKGSRC_GCC_VERSION=   ${_GCC_PKGBASE}-${_GCC_DIST_VERSION}
+_NEED_NEWER_GCC!=      \
+       if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION}; then \
+               ${ECHO} "NO";                                           \
+       else                                                            \
+               ${ECHO} "YES";                                          \
+       fi
+MAKEFLAGS+=    _NEED_NEWER_GCC="${_NEED_NEWER_GCC}"
+.endif
+.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \
+    !empty(_NEED_NEWER_GCC:M[yY][eE][sS])
+PKG_SKIP_REASON=       "Unable to satisfy dependency: ${_GCC_DEPENDS}"
+.endif
+
 .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
 #
 # Ensure that the correct rpath is passed to the linker if we need to
@@ -205,28 +223,8 @@
 _GCC_LDFLAGS+= -L${_dir_} ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_}
 .  endfor
 LDFLAGS+=      ${_GCC_LDFLAGS}
-.endif
-
-# Check if any of the versions of GCC in pkgsrc can satisfy the _GCC_REQD
-# requirement.
-#
-.if !defined(_NEED_NEWER_GCC)
-_PKGSRC_GCC_VERSION=   ${_GCC_PKGBASE}-${_GCC_DIST_VERSION}
-_NEED_NEWER_GCC!=      \
-       if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION}; then \
-               ${ECHO} "NO";                                           \
-       else                                                            \
-               ${ECHO} "YES";                                          \
-       fi
-MAKEFLAGS+=    _NEED_NEWER_GCC="${_NEED_NEWER_GCC}"
-.endif
-.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) && \
-    !empty(_NEED_NEWER_GCC:M[yY][eE][sS])
-PKG_SKIP_REASON=       "Unable to satisfy dependency: ${_GCC_DEPENDS}"
-.endif
 
 # Add the dependency on GCC.
-.if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS])
 .  if empty(USE_BUILDLINK2:M[nN][oO])
 .    for _dir_ in ${_GCC_PKGSRCDIR}
 .      include "${_dir_}/buildlink2.mk"



Home | Main Index | Thread Index | Old Index