pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk * Let CC/CXX/CPP/FC always point to the compiler us...
details: https://anonhg.NetBSD.org/pkgsrc/rev/99fa95ccff64
branches: trunk
changeset: 467901:99fa95ccff64
user: jlam <jlam%pkgsrc.org@localhost>
date: Sun Feb 08 02:59:14 2004 +0000
description:
* Let CC/CXX/CPP/FC always point to the compiler used in the actual
building of software. For packages that use either buildlink2 or
buildlink3, this would be the wrapper script in ${BUILDLINK_DIR}.
* Garbage-collect _BLNK_WRAP_SETENV.* as those are not needed after
the above changes. Configure and make processes will automatically
find the right compilers in the PATH.
* PKGLIBTOOL and PKGSHLIBTOOL are no longer needed since LIBTOOL and
SHLIBTOOL point to the correct libtools regardless of any
USE_BUILDLINK[23] definitions.
diffstat:
mk/bsd.pkg.mk | 18 +++++++-------
mk/buildlink2/bsd.buildlink2.mk | 49 +++++++++-------------------------------
mk/buildlink3/bsd.buildlink3.mk | 49 +++++++++-------------------------------
mk/compiler/ccache.mk | 12 +++++----
mk/compiler/distcc.mk | 12 +++++----
mk/compiler/gcc.mk | 19 +++++++++------
mk/compiler/mipspro.mk | 11 +++++---
mk/compiler/sunpro.mk | 11 +++++---
8 files changed, 70 insertions(+), 111 deletions(-)
diffs (truncated from 447 to 300 lines):
diff -r 3b5cc8bd070f -r 99fa95ccff64 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Sun Feb 08 02:08:21 2004 +0000
+++ b/mk/bsd.pkg.mk Sun Feb 08 02:59:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1377 2004/02/07 02:56:14 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1378 2004/02/08 02:59:14 jlam Exp $
#
# This file is in the public domain.
#
@@ -367,14 +367,14 @@
.else
LIBTOOL_REQD?= 1.4.20010614nb11
.endif
-LIBTOOL?= ${LOCALBASE}/bin/libtool
-SHLIBTOOL?= ${LOCALBASE}/bin/shlibtool
+PKG_LIBTOOL?= ${LOCALBASE}/bin/libtool
+PKG_SHLIBTOOL?= ${LOCALBASE}/bin/shlibtool
+LIBTOOL?= ${PKG_LIBTOOL}
+SHLIBTOOL?= ${PKG_SHLIBTOOL}
.if defined(USE_LIBTOOL)
-PKGLIBTOOL= ${LIBTOOL}
-PKGSHLIBTOOL= ${SHLIBTOOL}
BUILD_DEPENDS+= libtool-base>=${LIBTOOL_REQD}:../../devel/libtool-base
-CONFIGURE_ENV+= LIBTOOL="${PKGLIBTOOL} ${LIBTOOL_FLAGS}"
-MAKE_ENV+= LIBTOOL="${PKGLIBTOOL} ${LIBTOOL_FLAGS}"
+CONFIGURE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
+MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}"
.endif
.if defined(BUILD_USES_MSGFMT) && \
@@ -2308,7 +2308,7 @@
${_PKG_SILENT}${_PKG_DEBUG} \
if [ -f ${ltconfig} ]; then \
${RM} -f ${ltconfig}; \
- ${ECHO} "${RM} -f libtool; ${LN} -s ${PKGLIBTOOL} libtool" \
+ ${ECHO} "${RM} -f libtool; ${LN} -s ${LIBTOOL} libtool" \
> ${ltconfig}; \
${CHMOD} +x ${ltconfig}; \
fi
@@ -2385,7 +2385,7 @@
${_PKG_SILENT}${_PKG_DEBUG} \
if [ -f ${libtool} ]; then \
(${ECHO} '#!${CONFIG_SHELL}'; \
- ${ECHO} 'exec ${PKGLIBTOOL} "$$@"'; \
+ ${ECHO} 'exec ${LIBTOOL} "$$@"'; \
) > ${libtool}.override; \
if [ -x ${libtool} ]; then \
${CHMOD} +x ${libtool}.override; \
diff -r 3b5cc8bd070f -r 99fa95ccff64 mk/buildlink2/bsd.buildlink2.mk
--- a/mk/buildlink2/bsd.buildlink2.mk Sun Feb 08 02:08:21 2004 +0000
+++ b/mk/buildlink2/bsd.buildlink2.mk Sun Feb 08 02:59:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.112 2004/02/06 04:37:02 jlam Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.113 2004/02/08 02:59:14 jlam Exp $
#
# An example package buildlink2.mk file:
#
@@ -479,10 +479,6 @@
.if !empty(USE_LANGUAGES:Mfortran) || defined(USE_FORTRAN)
_BLNK_WRAPPEES+= FC
.endif
-.if defined(USE_LIBTOOL)
-PKGLIBTOOL= ${BUILDLINK_LIBTOOL}
-PKGSHLIBTOOL= ${BUILDLINK_SHLIBTOOL}
-.endif
_BLNK_WRAPPEES+= LIBTOOL SHLIBTOOL
.if defined(USE_X11)
IMAKE?= ${X11BASE}/bin/imake
@@ -499,10 +495,6 @@
# wrapper script that may be customized per wrapper:
#
-# _BLNK_WRAP_SETENV.<wrappee> resets the value of CC, CPP, etc. in the
-# configure and make environments (CONFIGURE_ENV, MAKE_ENV) so that
-# they point to the wrappers.
-#
# _BLNK_WRAP_{*CACHE*,*LOGIC*}.<wrappee> are parts of the wrapper script
# system as described in pkgsrc/mk/buildlink2/README. The files not
# ending in "-trans" represent pieces of the wrapper script that may
@@ -546,7 +538,6 @@
# generate the wrapper for the wrappee.
#
_BLNK_WRAPPER_SH.${_wrappee_}= ${.CURDIR}/../../mk/buildlink2/wrapper.sh
-_BLNK_WRAP_SETENV.${_wrappee_}= ${_wrappee_}="${BUILDLINK_${_wrappee_}:T}"
_BLNK_WRAP_SANITIZE_PATH.${_wrappee_}= ${_BLNK_WRAP_SANITIZE_PATH}
_BLNK_WRAP_ENV.${_wrappee_}= ${_BLNK_WRAP_ENV}
_BLNK_WRAP_PRIVATE_PRE_CACHE.${_wrappee_}= ${_BLNK_EMPTY_FILE}
@@ -559,27 +550,12 @@
_BLNK_WRAP_POST_LOGIC.${_wrappee_}= ${_BLNK_EMPTY_FILE}
.endfor
-# Don't bother adding AS, CPP to the configure or make environments as
-# adding them seems to break some GNU configure scripts.
-#
-_BLNK_WRAP_SETENV.AS= # empty
-_BLNK_WRAP_SETENV.CPP= # empty
-
-# Also override any F77 value in the environment when compiling Fortran
-# code.
-#
-_BLNK_WRAP_SETENV.FC+= F77="${BUILDLINK_FC:T}"
-
-# Don't override the default LIBTOOL and SHLIBTOOL settings in the
-# environment, as they already correctly point to the correct values, and
-# don't sanitize the PATH because we want libtool to invoke the wrapper
+# Don't sanitize the PATH because we want libtool to invoke the wrapper
# scripts, too.
#
-_BLNK_WRAP_SETENV.LIBTOOL= # empty
_BLNK_WRAPPER_SH.LIBTOOL= ${.CURDIR}/../../mk/buildlink2/libtool.sh
_BLNK_WRAP_SANITIZE_PATH.LIBTOOL= # empty
#
-_BLNK_WRAP_SETENV.SHLIBTOOL= # empty
_BLNK_WRAPPER_SH.SHLIBTOOL= ${.CURDIR}/../../mk/buildlink2/libtool.sh
_BLNK_WRAP_SANITIZE_PATH.SHLIBTOOL= # empty
@@ -605,13 +581,6 @@
_BLNK_WRAP_PRIVATE_POST_CACHE.SHLIBTOOL= ${_BLNK_WRAP_PRIVATE_POST_CACHE.LIBTOOL}
_BLNK_WRAP_POST_LOGIC.SHLIBTOOL= ${_BLNK_WRAP_POST_LOGIC.LIBTOOL}
-# Allow BUILDLINK_SETENV.<wrappee> to override _BLNK_WRAP_SETENV.<wrappee>.
-.for _wrappee_ in ${_BLNK_WRAPPEES}
-. if defined(BUILDLINK_SETENV.${_wrappee_})
-_BLNK_WRAP_SETENV.${_wrappee_}= ${BUILDLINK_SETENV.${_wrappee_}}
-. endif
-.endfor
-
# Don't transform the arguments for imake, which uses the C preprocessor
# to generate Makefiles, so that imake will find its config files.
#
@@ -626,11 +595,15 @@
buildlink-wrappers: ${_BLNK_FAKE_LA}
.for _wrappee_ in ${_BLNK_WRAPPEES}
-CONFIGURE_ENV+= ${_BLNK_WRAP_SETENV.${_wrappee_}}
-MAKE_ENV+= ${_BLNK_WRAP_SETENV.${_wrappee_}}
+. if defined(PKG_${_wrappee_})
+_BLNK_PKG_${_wrappee_}= ${PKG_${_wrappee_}}
+. else
+_BLNK_PKG_${_wrappee_}= ${${_wrappee_}}
+. endif
BUILDLINK_${_wrappee_}= \
- ${BUILDLINK_DIR}/bin/${${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+ ${BUILDLINK_DIR}/bin/${_BLNK_PKG_${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+${_wrappee_}:= ${BUILDLINK_${_wrappee_}:T}
_BLNK_WRAPPER_TRANSFORM_SED.${_wrappee_}= \
-e "s|@BUILDLINK_DIR@|${BUILDLINK_DIR}|g" \
@@ -670,7 +643,7 @@
${_PKG_SILENT}${_PKG_DEBUG}${ECHO_BUILDLINK_MSG} \
"Creating wrapper: ${.TARGET}"
${_PKG_SILENT}${_PKG_DEBUG} \
- wrappee="${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
+ wrappee="${_BLNK_PKG_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
case $${wrappee} in \
/*) absdir=; \
;; \
@@ -700,7 +673,7 @@
${MKDIR} ${.TARGET:H}; \
${CAT} ${_BLNK_WRAPPER_SH.${_wrappee_}} | \
${SED} ${_BLNK_WRAPPER_TRANSFORM_SED.${_wrappee_}} \
- -e "s|@WRAPPEE@|$${absdir}${${_wrappee_}:Q}|g" \
+ -e "s|@WRAPPEE@|$${absdir}${_BLNK_PKG_${_wrappee_}:Q}|g" \
> ${.TARGET}; \
${CHMOD} +x ${.TARGET}
.endif
diff -r 3b5cc8bd070f -r 99fa95ccff64 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk Sun Feb 08 02:08:21 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk Sun Feb 08 02:59:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.78 2004/02/06 18:45:03 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.79 2004/02/08 02:59:14 jlam Exp $
#
# An example package buildlink3.mk file:
#
@@ -954,10 +954,6 @@
.if !empty(USE_LANGUAGES:Mfortran) || defined(USE_FORTRAN)
_BLNK_WRAPPEES+= FC
.endif
-.if defined(USE_LIBTOOL)
-PKGLIBTOOL= ${BUILDLINK_LIBTOOL}
-PKGSHLIBTOOL= ${BUILDLINK_SHLIBTOOL}
-.endif
_BLNK_WRAPPEES+= LIBTOOL SHLIBTOOL
.if defined(USE_X11)
IMAKE?= ${X11BASE}/bin/imake
@@ -973,10 +969,6 @@
# _BLNK_WRAP_*.<wrappee> variables represent "template methods" of the
# wrapper script that may be customized per wrapper:
#
-# _BLNK_WRAP_SETENV.<wrappee> resets the value of CC, CPP, etc. in the
-# configure and make environments (CONFIGURE_ENV, MAKE_ENV) so that
-# they point to the wrappers.
-#
# _BLNK_WRAP_{*CACHE*,*LOGIC*}.<wrappee> are parts of the wrapper script
# system as described in pkgsrc/mk/buildlink3/README. The files not
# ending in "-trans" represent pieces of the wrapper script that may
@@ -1023,7 +1015,6 @@
# generate the wrapper for the wrappee.
#
_BLNK_WRAPPER_SH.${_wrappee_}= ${.CURDIR}/../../mk/buildlink3/wrapper.sh
-_BLNK_WRAP_SETENV.${_wrappee_}= ${_wrappee_}="${BUILDLINK_${_wrappee_}:T}"
_BLNK_WRAP_SANITIZE_PATH.${_wrappee_}= ${_BLNK_WRAP_SANITIZE_PATH}
_BLNK_WRAP_EXTRA_FLAGS.${_wrappee_}= # empty
_BLNK_WRAP_ENV.${_wrappee_}= ${_BLNK_WRAP_ENV}
@@ -1041,27 +1032,12 @@
_BLNK_WRAP_POST_LOGIC.${_wrappee_}= ${_BLNK_EMPTY_FILE}
.endfor
-# Don't bother adding AS, CPP to the configure or make environments as
-# adding them seems to break some GNU configure scripts.
-#
-_BLNK_WRAP_SETENV.AS= # empty
-_BLNK_WRAP_SETENV.CPP= # empty
-
-# Also override any F77 value in the environment when compiling Fortran
-# code.
-#
-_BLNK_WRAP_SETENV.FC+= F77="${BUILDLINK_FC:T}"
-
-# Don't override the default LIBTOOL and SHLIBTOOL settings in the
-# environment, as they already correctly point to the correct values, and
-# don't sanitize the PATH because we want libtool to invoke the wrapper
+# Don't sanitize the PATH because we want libtool to invoke the wrapper
# scripts, too.
#
-_BLNK_WRAP_SETENV.LIBTOOL= # empty
_BLNK_WRAPPER_SH.LIBTOOL= ${.CURDIR}/../../mk/buildlink3/libtool.sh
_BLNK_WRAP_SANITIZE_PATH.LIBTOOL= # empty
#
-_BLNK_WRAP_SETENV.SHLIBTOOL= # empty
_BLNK_WRAPPER_SH.SHLIBTOOL= ${.CURDIR}/../../mk/buildlink3/libtool.sh
_BLNK_WRAP_SANITIZE_PATH.SHLIBTOOL= # empty
@@ -1121,13 +1097,6 @@
_BLNK_WRAP_PRIVATE_POST_CACHE.SHLIBTOOL= ${_BLNK_WRAP_PRIVATE_POST_CACHE.LIBTOOL}
_BLNK_WRAP_POST_LOGIC.SHLIBTOOL= ${_BLNK_WRAP_POST_LOGIC.LIBTOOL}
-# Allow BUILDLINK_SETENV.<wrappee> to override _BLNK_WRAP_SETENV.<wrappee>.
-.for _wrappee_ in ${_BLNK_WRAPPEES}
-. if defined(BUILDLINK_SETENV.${_wrappee_})
-_BLNK_WRAP_SETENV.${_wrappee_}= ${BUILDLINK_SETENV.${_wrappee_}}
-. endif
-.endfor
-
# Don't transform the arguments for imake, which uses the C preprocessor
# to generate Makefiles, so that imake will find its config files.
#
@@ -1156,11 +1125,15 @@
buildlink-wrappers: ${_BLNK_LIBTOOL_FIX_LA}
.for _wrappee_ in ${_BLNK_WRAPPEES}
-CONFIGURE_ENV+= ${_BLNK_WRAP_SETENV.${_wrappee_}}
-MAKE_ENV+= ${_BLNK_WRAP_SETENV.${_wrappee_}}
+. if defined(PKG_${_wrappee_})
+_BLNK_PKG_${_wrappee_}= ${PKG_${_wrappee_}}
+. else
+_BLNK_PKG_${_wrappee_}= ${${_wrappee_}}
+. endif
BUILDLINK_${_wrappee_}= \
- ${BUILDLINK_DIR}/bin/${${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+ ${BUILDLINK_DIR}/bin/${_BLNK_PKG_${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
+${_wrappee_}:= ${BUILDLINK_${_wrappee_}:T}
# Filter to scrunch shell scripts by removing comments and empty lines.
_BLNK_SH_CRUNCH_FILTER= \
@@ -1214,7 +1187,7 @@
${_PKG_SILENT}${_PKG_DEBUG}${ECHO_BUILDLINK_MSG} \
"=> Creating wrapper: ${.TARGET}"
${_PKG_SILENT}${_PKG_DEBUG} \
- wrappee="${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
+ wrappee="${_BLNK_PKG_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \
case $${wrappee} in \
/*) absdir=; \
;; \
@@ -1244,7 +1217,7 @@
${MKDIR} ${.TARGET:H}; \
${CAT} ${_BLNK_WRAPPER_SH.${_wrappee_}} | \
${SED} ${_BLNK_WRAPPER_TRANSFORM_SED.${_wrappee_}} \
- -e "s|@WRAPPEE@|$${absdir}${${_wrappee_}:Q}|g" | \
+ -e "s|@WRAPPEE@|$${absdir}${_BLNK_PKG_${_wrappee_}:Q}|g" | \
${_BLNK_SH_CRUNCH_FILTER} \
> ${.TARGET}; \
${CHMOD} +x ${.TARGET}
diff -r 3b5cc8bd070f -r 99fa95ccff64 mk/compiler/ccache.mk
--- a/mk/compiler/ccache.mk Sun Feb 08 02:08:21 2004 +0000
+++ b/mk/compiler/ccache.mk Sun Feb 08 02:59:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ccache.mk,v 1.11 2004/02/07 02:58:10 jlam Exp $
+# $NetBSD: ccache.mk,v 1.12 2004/02/08 02:59:14 jlam Exp $
.if !defined(COMPILER_CCACHE_MK)
COMPILER_CCACHE_MK= one
@@ -38,14 +38,16 @@
_CCACHE_DIR= ${WRKDIR}/.ccache
_CCACHE_LINKS= # empty
. if !empty(_LANGUAGES.ccache:Mc)
-_CCACHE_CC:= ${_CCACHE_DIR}/bin/${CC:T}
Home |
Main Index |
Thread Index |
Old Index