diff options
author | tv <tv@pkgsrc.org> | 2004-11-30 15:06:34 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2004-11-30 15:06:34 +0000 |
commit | d6805004db4773e06f231f6d0fa63b00c54788c5 (patch) | |
tree | cc184d0f16711b5a5114e1fa4d17364d4ca763f0 | |
parent | e36f64eaeea69d6082464634f1f70bd1d8439c38 (diff) | |
download | pkgsrc-d6805004db4773e06f231f6d0fa63b00c54788c5.tar.gz |
merge from HEAD
-rw-r--r-- | mk/bsd.sites.mk | 3 | ||||
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 6 | ||||
-rw-r--r-- | mk/compiler.mk | 12 | ||||
-rw-r--r-- | mk/compiler/ccache.mk | 28 | ||||
-rw-r--r-- | mk/compiler/ccc.mk | 40 | ||||
-rw-r--r-- | mk/compiler/distcc.mk | 28 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 49 | ||||
-rw-r--r-- | mk/compiler/mipspro.mk | 39 | ||||
-rw-r--r-- | mk/compiler/sunpro.mk | 39 | ||||
-rw-r--r-- | mk/compiler/xlc.mk | 39 | ||||
-rw-r--r-- | mk/pthread.buildlink3.mk | 4 | ||||
-rw-r--r-- | mk/wrapper/bsd.wrapper.mk | 90 |
12 files changed, 232 insertions, 145 deletions
diff --git a/mk/bsd.sites.mk b/mk/bsd.sites.mk index d613eec7753..7e35a6c95a8 100644 --- a/mk/bsd.sites.mk +++ b/mk/bsd.sites.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.sites.mk,v 1.20.2.1 2004/11/28 20:11:32 tv Exp $ +# $NetBSD: bsd.sites.mk,v 1.20.2.2 2004/11/30 15:06:34 tv Exp $ # # Default MASTER_SITES @@ -293,7 +293,6 @@ MASTER_SITE_OPENOFFICE+= \ http://www.fs.tum.de/~mrauch/OpenOffice/download/ MASTER_SITE_CYGWIN+= \ - http://mirror.mcs.anl.gov/cygwin/ \ http://mirrors.kernel.org/sources.redhat.com/cygwin/ \ http://mirrors.rcn.net/pub/sourceware/cygwin/ \ http://mirrors.xmission.com/cygwin/ \ diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index c2cdffbd2e7..9f96754571e 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.163.2.3 2004/11/28 20:11:32 tv Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.163.2.4 2004/11/30 15:06:35 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -986,8 +986,8 @@ WRAPPER_TRANSFORM_CMDS+= ${_BLNK_TRANSFORM} # building software. # .if defined(USE_LIBTOOL) -_WRAPPEES+= LIBTOOL -_WRAPPEES+= SHLIBTOOL +WRAPPEES+= LIBTOOL +WRAPPEES+= SHLIBTOOL _LIBTOOL= ${WRAPPER_LIBTOOL} _SHLIBTOOL= ${WRAPPER_SHLIBTOOL} .endif diff --git a/mk/compiler.mk b/mk/compiler.mk index 8bf6597074b..848480f567e 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.38.2.1 2004/11/22 22:48:05 tv Exp $ +# $NetBSD: compiler.mk,v 1.38.2.2 2004/11/30 15:06:34 tv Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -114,9 +114,19 @@ _PKGSRC_COMPILER:= ${_compiler_} ${_PKGSRC_COMPILER} .endfor _PKGSRC_COMPILER:= ${_COMPILER} ${_PKGSRC_COMPILER} +_COMPILER_STRIP_VARS= # empty + .for _compiler_ in ${_PKGSRC_COMPILER} . include "../../mk/compiler/${_compiler_}.mk" .endfor +.undef _compiler_ + +# Strip the leading paths from the toolchain variables since we manipulate +# the PATH to use the correct executable. +# +.for _var_ in ${_COMPILER_STRIP_VARS} +${_var_}:= ${${_var_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T} ${${_var_}:C/^/_asdf_/1:N_asdf_*} +.endfor .if defined(ABI) && !empty(ABI) _WRAP_EXTRA_ARGS.CC+= ${_COMPILER_ABI_FLAG.${ABI}} diff --git a/mk/compiler/ccache.mk b/mk/compiler/ccache.mk index d104a3c3e1f..deb3f791993 100644 --- a/mk/compiler/ccache.mk +++ b/mk/compiler/ccache.mk @@ -1,4 +1,4 @@ -# $NetBSD: ccache.mk,v 1.20.2.1 2004/11/22 22:48:05 tv Exp $ +# $NetBSD: ccache.mk,v 1.20.2.2 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_CCACHE_MK) COMPILER_CCACHE_MK= defined @@ -36,18 +36,20 @@ EVAL_PREFIX+= _CCACHEBASE=ccache _CCACHEBASE_DEFAULT= ${LOCALBASE} _CCACHE_DIR= ${WRKDIR}/.ccache -_CCACHE_LINKS= # empty +_CCACHE_VARS= # empty . if !empty(_LANGUAGES.ccache:Mc) +PKG_CC?= ${CC} +_CCACHE_VARS+= CC _CCACHE_CC:= ${_CCACHE_DIR}/bin/${PKG_CC:T} -_CCACHE_LINKS+= _CCACHE_CC +_ALIASES.CC?= cc PKG_CC:= ${_CCACHE_CC} -CC= ${PKG_CC:T} . endif . if !empty(_LANGUAGES.ccache:Mc++) +PKG_CXX?= ${CXX} +_CCACHE_VARS+= CXX _CCACHE_CXX:= ${_CCACHE_DIR}/bin/${PKG_CXX:T} -_CCACHE_LINKS+= _CCACHE_CXX +_ALIASES.CXX?= c++ PKG_CXX:= ${_CCACHE_CXX} -CXX= ${PKG_CXX:T} . endif # Prepend the path the to the compiler to the PATH @@ -68,13 +70,19 @@ BUILD_ENV+= CCACHE_DIR=${CCACHE_DIR:Q} .endif # Create symlinks for the compiler into ${WRKDIR}. -. for _target_ in ${_CCACHE_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +. for _var_ in ${_CCACHE_VARS} +. if !target(${_CCACHE_${_var_}}) +override-tools: ${_CCACHE_${_var_}} +${_CCACHE_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ ${LN} -fs ${_CCACHEBASE}/bin/ccache ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -fs ${_CCACHEBASE}/bin/ccache ${_alias_}; \ + fi +. endfor . endif . endfor .endif # _USE_CCACHE == "yes" diff --git a/mk/compiler/ccc.mk b/mk/compiler/ccc.mk index 0d880193feb..ce77dfe0f7b 100644 --- a/mk/compiler/ccc.mk +++ b/mk/compiler/ccc.mk @@ -1,4 +1,4 @@ -# $NetBSD: ccc.mk,v 1.2.2.1 2004/11/23 20:54:12 tv Exp $ +# $NetBSD: ccc.mk,v 1.2.2.2 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_CCC_MK) COMPILER_CCC_MK= defined @@ -20,22 +20,28 @@ _LANGUAGES.ccc+= ${LANGUAGES.ccc:M${_lang_}} .endfor _CCC_DIR= ${WRKDIR}/.ccc -_CCC_LINKS= # empty +_CCC_VARS= # empty .if exists(/usr/bin/cc) +_CCC_VARS+= CC _CCC_CC= ${_CCC_DIR}/cc -_CCC_LINKS+= _CCC_CC -PKG_CC= ${_CCC_CC} -CC= ${PKG_CC:T} +_ALIASES.CC= cc CCPATH= /usr/bin/cc +PKG_CC:= ${_CCC_CC} +. if !empty(CC:M*gcc) +CC:= ${PKG_CC:T} # ${CC} should be named "cc". +. endif .endif - .if exists(/usr/bin/cxx) +_CCC_VARS+= CXX _CCC_CXX= ${_CCC_DIR}/cxx -_CCC_LINKS+= _CCC_CXX -PKG_CXX= ${_CCC_CXX} -CXX= ${PKG_CXX:T} +_ALIASES.CXX= c++ cxx CXXPATH= /usr/bin/cxx +PKG_CXX:= ${_CCC_CXX} +. if !empty(CXX:M*g++) +CXX:= ${PKG_CXX:T} # ${CXX} should be named "cxx" +. endif .endif +_COMPILER_STRIP_VARS+= ${_CCC_VARS} .if exists(${CCPATH}) && !defined(CC_VERSION_STRING) CC_VERSION_STRING!= ${CCPATH} -V 2>&1 | awk '{print; exit(0);}' @@ -59,16 +65,22 @@ CFLAGS+=-ieee CXXFLAGS+=-ieee # Create compiler driver scripts in ${WRKDIR}. -.for _target_ in ${_CCC_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +.for _var_ in ${_CCC_VARS} +. if !target(${_CCC_${_var_}}) +override-tools: ${_CCC_${_var_}} +${_CCC_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ - ${ECHO} 'exec /usr/bin/${${_target_}:T} "$$@"'; \ + ${ECHO} 'exec /usr/bin/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -f ${.TARGET} ${_alias_}; \ + fi +. endfor . endif .endfor diff --git a/mk/compiler/distcc.mk b/mk/compiler/distcc.mk index f6494626d1e..a05ef586cfd 100644 --- a/mk/compiler/distcc.mk +++ b/mk/compiler/distcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: distcc.mk,v 1.21.2.1 2004/11/22 22:48:05 tv Exp $ +# $NetBSD: distcc.mk,v 1.21.2.2 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_DISTCC_MK) COMPILER_DISTCC_MK= defined @@ -36,18 +36,20 @@ EVAL_PREFIX+= _DISTCCBASE=distcc _DISTCCBASE_DEFAULT= ${LOCALBASE} _DISTCC_DIR= ${WRKDIR}/.distcc -_DISTCC_LINKS= # empty +_DISTCC_VARS= # empty . if !empty(_LANGUAGES.distcc:Mc) +PKG_CC?= ${CC} +_DISTCC_VARS+= CC _DISTCC_CC:= ${_DISTCC_DIR}/bin/${PKG_CC:T} -_DISTCC_LINKS+= _DISTCC_CC +_ALIASES.CC?= cc PKG_CC:= ${_DISTCC_CC} -CC= ${PKG_CC:T} . endif . if !empty(_LANGUAGES.distcc:Mc++) +PKG_CXX?= ${CXX} +_DISTCC_VARS+= CXX _DISTCC_CXX:= ${_DISTCC_DIR}/bin/${PKG_CXX:T} -_DISTCC_LINKS+= _DISTCC_CXX +_ALIASES.CXX?= c++ PKG_CXX:= ${_DISTCC_CXX} -CXX= ${PKG_CXX:T} . endif # Prepend the path to the compiler to the PATH. @@ -69,13 +71,19 @@ BUILD_ENV+= DISTCC_VERBOSE=${DISTCC_VERBOSE:Q} .endif # Create symlinks for the compiler into ${WRKDIR}. -. for _target_ in ${_DISTCC_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +. for _var_ in ${_DISTCC_VARS} +. if !target(${_DISTCC_${_var_}}) +override-tools: ${_DISTCC_${_var_}} +${_DISTCC_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ ${LN} -fs ${_DISTCCBASE}/bin/distcc ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -fs ${_DISTCCBASE}/bin/distcc ${_alias_}; \ + fi +. endfor . endif . endfor .endif # _USE_DISTCC == "yes" diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 009ca31b1f6..e1899feb0df 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.74.2.1 2004/11/23 20:54:12 tv Exp $ +# $NetBSD: gcc.mk,v 1.74.2.2 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined @@ -334,7 +334,7 @@ LDFLAGS+= ${_GCC_LDFLAGS} # GCC executables. # _GCC_DIR= ${WRKDIR}/.gcc -_GCC_LINKS= # empty +_GCC_VARS= # empty .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) _GCCBINDIR= ${_GCC_PREFIX}bin @@ -342,34 +342,35 @@ _GCCBINDIR= ${_GCC_PREFIX}bin _GCCBINDIR= ${_CC:H} .endif .if exists(${_GCCBINDIR}/gcc) +_GCC_VARS+= CC _GCC_CC= ${_GCC_DIR}/bin/gcc -_GCC_LINKS+= _GCC_CC -PKG_CC= ${_GCC_CC} -CC= ${PKG_CC:T} +_ALIASES.CC= cc gcc CCPATH= ${_GCCBINDIR}/gcc +PKG_CC:= ${_GCC_CC} .endif -.if exists(${_GCCBINDIR}/cpp) && ${OPSYS} != "Darwin" +.if exists(${_GCCBINDIR}/cpp) +_GCC_VARS+= CPP _GCC_CPP= ${_GCC_DIR}/bin/cpp -_GCC_LINKS+= _GCC_CPP -PKG_CPP= ${_GCC_CPP} -CPP= ${PKG_CPP:T} +_ALIASES.CPP= cpp +CPPPATH= ${_GCCBINDIR}/cpp +PKG_CPP:= ${_GCC_CPP} .endif .if exists(${_GCCBINDIR}/g++) +_GCC_VARS+= CXX _GCC_CXX= ${_GCC_DIR}/bin/g++ -_GCC_LINKS+= _GCC_CXX -PKG_CXX= ${_GCC_CXX} -CXX= ${PKG_CXX:T} +_ALIASES.CXX= c++ g++ CXXPATH= ${_GCCBINDIR}/g++ +PKG_CXX:= ${_GCC_CXX} .endif .if exists(${_GCCBINDIR}/g77) +_GCC_VARS+= FC _GCC_FC= ${_GCC_DIR}/bin/g77 -_GCC_LINKS+= _GCC_FC -PKG_FC= ${_GCC_FC} -FC= ${PKG_FC:T} -F77= ${PKG_FC:T} +_ALIASES.FC= f77 g77 FCPATH= ${_GCCBINDIR}/g77 F77PATH= ${_GCCBINDIR}/g77 +PKG_FC:= ${_GCC_FC} .endif +_COMPILER_STRIP_VARS+= ${_GCC_VARS} # Pass the required flags to imake to tell it we're using gcc on Solaris. .if ${OPSYS} == "SunOS" @@ -416,16 +417,22 @@ BUILD_DEPENDS+= ${_GCC_DEPENDENCY} .endif # Create compiler driver scripts in ${WRKDIR}. -.for _target_ in ${_GCC_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +.for _var_ in ${_GCC_VARS} +. if !target(${_GCC_${_var_}}) +override-tools: ${_GCC_${_var_}} +${_GCC_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ - ${ECHO} 'exec ${_GCCBINDIR}/${${_target_}:T} "$$@"'; \ + ${ECHO} 'exec ${_GCCBINDIR}/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -f ${.TARGET} ${_alias_}; \ + fi +. endfor . endif .endfor diff --git a/mk/compiler/mipspro.mk b/mk/compiler/mipspro.mk index f6995f70f40..51a76c93078 100644 --- a/mk/compiler/mipspro.mk +++ b/mk/compiler/mipspro.mk @@ -1,4 +1,4 @@ -# $NetBSD: mipspro.mk,v 1.26.2.1 2004/11/23 20:54:12 tv Exp $ +# $NetBSD: mipspro.mk,v 1.26.2.2 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_MIPSPRO_MK) COMPILER_MIPSPRO_MK= defined @@ -18,21 +18,28 @@ _LANGUAGES.mipspro+= ${LANGUAGES.mipspro:M${_lang_}} .endfor _MIPSPRO_DIR= ${WRKDIR}/.mipspro -_MIPSPRO_LINKS= # empty +_MIPSPRO_VARS= # empty .if exists(${MIPSPROBASE}/bin/cc) +_MIPSPRO_VARS+= CC _MIPSPRO_CC= ${_MIPSPRO_DIR}/bin/cc -_MIPSPRO_LINKS+= _MIPSPRO_CC -PKG_CC= ${_MIPSPRO_CC} -CC= ${PKG_CC:T} +_ALIASES.CC= cc CCPATH= ${MIPSPROBASE}/bin/cc +PKG_CC:= ${_MIPSPRO_CC} +. if !empty(CC:M*gcc) +CC:= ${PKG_CC:T} # ${CC} should be named "cc". +. endif .endif .if exists(${MIPSPROBASE}/bin/CC) +_MIPSPRO_VARS+= CXX _MIPSPRO_CXX= ${_MIPSPRO_DIR}/bin/CC -_MIPSPRO_LINKS+= _MIPSPRO_CXX -PKG_CXX= ${_MIPSPRO_CXX} -CXX= ${PKG_CXX:T} +_ALIASES.CXX= CC c++ CXXPATH= ${MIPSPROBASE}/bin/CC +PKG_CXX:= ${_MIPSPRO_CXX} +. if !empty(CXX:M*g++) +CXX:= ${PKG_CXX:T} # ${CXX} should be named "CC" +. endif .endif +_COMPILER_STRIP_VARS+= ${_MIPSPRO_VARS} .if exists(${CCPATH}) # MIPSpro Compilers: Version 7.3.1.2m @@ -63,16 +70,22 @@ PREPEND_PATH+= ${_MIPSPRO_DIR}/bin .endif # Create compiler driver scripts in ${WRKDIR}. -.for _target_ in ${_MIPSPRO_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +.for _var_ in ${_MIPSPRO_VARS} +. if !target(${_MIPSPRO_${_var_}}) +override-tools: ${_MIPSPRO_${_var_}} +${_MIPSPRO_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ - ${ECHO} 'exec ${MIPSPROBASE}/bin/${${_target_}:T} "$$@"'; \ + ${ECHO} 'exec ${MIPSPROBASE}/bin/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -f ${.TARGET} ${_alias_}; \ + fi +. endfor . endif .endfor diff --git a/mk/compiler/sunpro.mk b/mk/compiler/sunpro.mk index 67a2f769987..2362d3a61cb 100644 --- a/mk/compiler/sunpro.mk +++ b/mk/compiler/sunpro.mk @@ -1,4 +1,4 @@ -# $NetBSD: sunpro.mk,v 1.22.2.1 2004/11/23 20:54:12 tv Exp $ +# $NetBSD: sunpro.mk,v 1.22.2.2 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_SUNPRO_MK) COMPILER_SUNPRO_MK= defined @@ -18,21 +18,28 @@ _LANGUAGES.sunpro+= ${LANGUAGES.sunpro:M${_lang_}} .endfor _SUNPRO_DIR= ${WRKDIR}/.sunpro -_SUNPRO_LINKS= # empty +_SUNPRO_VARS= # empty .if exists(${SUNWSPROBASE}/bin/cc) +_SUNPRO_VARS+= CC _SUNPRO_CC= ${_SUNPRO_DIR}/bin/cc -_SUNPRO_LINKS+= _SUNPRO_CC -PKG_CC= ${_SUNPRO_CC} -CC= ${PKG_CC:T} +_ALIASES.CC= cc CCPATH= ${SUNWSPROBASE}/bin/cc +PKG_CC:= ${_SUNPRO_CC} +. if !empty(CC:M*gcc) +CC:= ${PKG_CC:T} # ${CC} should be named "cc". +. endif .endif .if exists(${SUNWSPROBASE}/bin/CC) +_SUNPRO_VARS+= CXX _SUNPRO_CXX= ${_SUNPRO_DIR}/bin/CC -_SUNPRO_LINKS+= _SUNPRO_CXX -PKG_CXX= ${_SUNPRO_CXX} -CXX= ${PKG_CXX:T} +_ALIASES.CXX= CC c++ CXXPATH= ${SUNWSPROBASE}/bin/CC +PKG_CXX:= ${_SUNPRO_CXX} +. if !empty(CXX:M*g++) +CXX:= ${PKG_CXX:T} # ${CXX} should be named "CC". +. endif .endif +_COMPILER_STRIP_VARS+= ${_SUNPRO_VARS} # SunPro passes rpath directives to the linker using "-R". _LINKER_RPATH_FLAG= -R @@ -57,16 +64,22 @@ PREPEND_PATH+= ${_SUNPRO_DIR}/bin .endif # Create compiler driver scripts in ${WRKDIR}. -.for _target_ in ${_SUNPRO_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +.for _var_ in ${_SUNPRO_VARS} +. if !target(${_SUNPRO_${_var_}}) +override-tools: ${_SUNPRO_${_var_}} +${_SUNPRO_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ - ${ECHO} 'exec ${SUNWSPROBASE}/bin/${${_target_}:T} "$$@"'; \ + ${ECHO} 'exec ${SUNWSPROBASE}/bin/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -f ${.TARGET} ${_alias_}; \ + fi +. endfor . endif .endfor diff --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk index 7e33499e64a..161dda7a9bd 100644 --- a/mk/compiler/xlc.mk +++ b/mk/compiler/xlc.mk @@ -1,4 +1,4 @@ -# $NetBSD: xlc.mk,v 1.2.2.2 2004/11/28 20:11:32 tv Exp $ +# $NetBSD: xlc.mk,v 1.2.2.3 2004/11/30 15:06:35 tv Exp $ .if !defined(COMPILER_XLC_MK) COMPILER_XLC_MK= defined @@ -18,21 +18,28 @@ _LANGUAGES.xlc+= ${LANGUAGES.xlc:M${_lang_}} .endfor _XLC_DIR= ${WRKDIR}/.xlc -_XLC_LINKS= # empty +_XLC_VARS= # empty .if exists(${XLCBASE}/bin/xlc) +_XLC_VARS+= CC _XLC_CC= ${_XLC_DIR}/bin/xlc -_XLC_LINKS+= _XLC_CC -PKG_CC= ${_XLC_CC} -CC= ${PKG_CC:T} +_ALIASES.CC= cc xlc CCPATH= ${XLCBASE}/bin/xlc +PKG_CC:= ${_XLC_CC} +. if !empty(CC:M*gcc) +CC:= ${PKG_CC:T} # ${CC} should be named "xlc". +. endif .endif .if exists(${XLCBASE}/bin/xlc++) +_XLC_VARS+= CXX _XLC_CXX= ${_XLC_DIR}/bin/xlc++ -_XLC_LINKS+= _XLC_CXX -PKG_CXX= ${_XLC_CXX} -CXX= ${PKG_CXX:T} +_ALIASES.CXX= c++ xlc++ CXXPATH= ${XLCBASE}/bin/xlc++ +PKG_CXX:= ${_XLC_CXX} +. if !empty(CXX:M*g++) +CXX:= ${PKG_CXX:T} # ${CXX} should be named "xlc++". +. endif .endif +_COMPILER_STRIP_VARS+= ${_XLC_VARS} .if exists(${CCPATH}) CC_VERSION_STRING!= ${CCPATH} -V 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE} @@ -52,16 +59,22 @@ PREPEND_PATH+= ${_XLC_DIR}/bin CFLAGS+=-ma # Create compiler driver scripts in ${WRKDIR}. -.for _target_ in ${_XLC_LINKS} -. if !target(${${_target_}}) -override-tools: ${${_target_}} -${${_target_}}: +.for _var_ in ${_XLC_VARS} +. if !target(${_XLC_${_var_}}) +override-tools: ${_XLC_${_var_}} +${_XLC_${_var_}}: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG} \ (${ECHO} '#!${TOOLS_SHELL}'; \ - ${ECHO} 'exec ${XLCBASE}/bin/${${_target_}:T} "$$@"'; \ + ${ECHO} 'exec ${XLCBASE}/bin/${.TARGET:T} "$$@"'; \ ) > ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} +. for _alias_ in ${_ALIASES.${_var_}:S/^/${.TARGET:H}\//} + ${_PKG_SILENT}${_PKG_DEBUG} \ + if [ ! -x "${_alias_}" ]; then \ + ${LN} -f ${.TARGET} ${_alias_}; \ + fi +. endfor . endif .endfor diff --git a/mk/pthread.buildlink3.mk b/mk/pthread.buildlink3.mk index 391a8de81bd..cd7c30c2eb2 100644 --- a/mk/pthread.buildlink3.mk +++ b/mk/pthread.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: pthread.buildlink3.mk,v 1.17.2.1 2004/11/28 20:11:32 tv Exp $ +# $NetBSD: pthread.buildlink3.mk,v 1.17.2.2 2004/11/30 15:06:34 tv Exp $ # # The pthreads strategy for pkgsrc is to "bless" a particular pthread # package as the Official Pthread Replacement (OPR). A package that uses @@ -96,7 +96,7 @@ # # PTHREAD_AUTO_VARS is "yes" or "no" for whether the values of the variables # PTHREAD_{CFLAGS,CPPFLAGS,LDFLAGS,LIBS} should be automatically added -# to their respective variables. Defaults to "yes". +# to their respective variables. Defaults to "no". # # _PKG_PTHREAD is the fall-back package pthread implementation use by # pthread.buildlink3.mk. diff --git a/mk/wrapper/bsd.wrapper.mk b/mk/wrapper/bsd.wrapper.mk index 04e25997eb8..7012d236a8f 100644 --- a/mk/wrapper/bsd.wrapper.mk +++ b/mk/wrapper/bsd.wrapper.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.wrapper.mk,v 1.12.2.2 2004/11/23 18:25:35 tv Exp $ +# $NetBSD: bsd.wrapper.mk,v 1.12.2.3 2004/11/30 15:06:35 tv Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -122,11 +122,7 @@ WRAPPER_VARS+= _WRAP_PATH # WRAPPEES+= AS WRAPPEES+= CC -# XXX The following is a workaround until I can find time to fix this -# XXX more completely (jlam). -.if ${CPP:N-*} != ${CC} WRAPPEES+= CPP -.endif WRAPPEES+= CXX WRAPPEES+= FC .if defined(USE_X11) @@ -135,9 +131,28 @@ WRAPPEES+= IMAKE .endif WRAPPEES+= LD +_WRAPPEE_UNIQUE_CMDS= # empty .for _wrappee_ in ${WRAPPEES} -_WRAPPEES+= ${_wrappee_} -.endfor +_WRAPPEES+= ${_wrappee_} +_WRAPPEE_${_wrappee_}= ${${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} +. if empty(_WRAPPEE_UNIQUE_CMDS:M${_WRAPPEE_${_wrappee_}}) +_WRAPPEE_UNIQUE_CMDS+= ${_WRAPPEE_${_wrappee_}} +_WRAPPEES_UNIQUE+= ${_wrappee_} +. endif +.endfor # WRAPPEES + +.for _wrappee_ in ${_WRAPPEES} +# +# Strip the leading paths from the toolchain variables since we manipulate +# the PATH to use the correct executable. +# +${_wrappee_}:= ${${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//:T} ${${_wrappee_}:C/^/_asdf_/1:N_asdf_*} +# +# WRAPPER_<wrappee> is the full path to the wrapper script, plus any +# trailing arguments to <wrappee>. +# +WRAPPER_${_wrappee_}= ${WRAPPER_BINDIR}/${${_wrappee_}} +.endfor # _WRAPPEES _WRAP_ALIASES.AS= as _WRAP_ALIASES.CC= cc gcc @@ -203,7 +218,7 @@ _WRAP_SKIP_TRANSFORM.${_wrappee_}?= no . else _WRAP_SKIP_TRANSFORM.${_wrappee_}?= ${_WRAP_SKIP_TRANSFORM} . endif -.endfor +.endfor # _WRAPPEES .if !empty(PKGSRC_COMPILER:Maix-xlc) _WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-aix-xlc @@ -291,16 +306,6 @@ _WRAP_SUBST_SED+= -e 's|@BUILD_ENV@|export '${BUILD_ENV:Q}'|' .endif .for _wrappee_ in ${_WRAPPEES} -. if defined(PKG_${_wrappee_}) -_WRAP_PKG_${_wrappee_}= ${PKG_${_wrappee_}} -. else -_WRAP_PKG_${_wrappee_}= ${${_wrappee_}} -. endif - -WRAPPER_${_wrappee_}= \ - ${WRAPPER_BINDIR}/${_WRAP_PKG_${_wrappee_}:T:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} -${_wrappee_}:= ${WRAPPER_${_wrappee_}:T} - _WRAP_SUBST_SED.${_wrappee_}= \ -e "s|@_WRAP_ENV@|${_WRAP_ENV.${_wrappee_}:Q}|g" \ -e "s|@_WRAP_EXTRA_ARGS@|${_WRAP_EXTRA_ARGS.${_wrappee_}:Q}|g" \ @@ -323,7 +328,10 @@ _WRAP_SUBST_SED.${_wrappee_}= \ ${_WRAP_SUBST_SED} _WRAP_COOKIE.${_wrappee_}= ${WRAPPER_DIR}/.wrapper_${_wrappee_}_done +.endfor # _WRAPPEES +.for _wrappee_ in ${_WRAPPEES_UNIQUE} +PKG_${_wrappee_}?= ${${_wrappee_}} do-wrapper: ${_WRAP_COOKIE.${_wrappee_}} ${_WRAP_COOKIE.${_wrappee_}}: \ ${_WRAPPER_SH.${_wrappee_}} \ @@ -337,49 +345,44 @@ ${_WRAP_COOKIE.${_wrappee_}}: \ ${_WRAP_SCAN.${_wrappee_}} \ ${_WRAP_SHELL_LIB} \ ${_WRAP_TRANSFORM.${_wrappee_}} - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_WRAPPER_MSG} \ - "=> Creating wrapper: ${WRAPPER_${_wrappee_}}" ${_PKG_SILENT}${_PKG_DEBUG} \ - wrappee="${_WRAP_PKG_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \ + wrapper="${WRAPPER_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \ + ${ECHO_WRAPPER_MSG} "=> Creating ${_wrappee_} wrapper: $$wrapper"; \ gen_wrapper=yes; \ - case $${wrappee} in \ - /*) \ - absdir=; \ - ;; \ - *) \ - save_IFS="$$IFS"; \ + wrappee="${PKG_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \ + case $$wrappee in \ + /*) ;; \ + *) save_IFS="$$IFS"; \ IFS=":"; \ for dir in $${PATH}; do \ case $${dir} in \ - *${BUILDLINK_DIR}*) \ + *${WRAPPER_DIR}*) \ ;; \ *) \ - if [ -f $${dir}/$${wrappee} ] || \ - [ -h $${dir}/$${wrappee} ] && \ - [ -x $${dir}/$${wrappee} ]; then \ - absdir=$${dir}/; \ - wrappee=$${absdir}$${wrappee}; \ + if ${TEST} -f $${dir}/$$wrappee -o \ + -h $${dir}/$$wrappee; then \ + wrappee=$${dir}/$$wrappee; \ break; \ fi; \ ;; \ esac; \ done; \ IFS="$$save_IFS"; \ - if [ ! -x "$${wrappee}" ]; then \ + if ${TEST} ! -x "$$wrappee"; then \ gen_wrapper=no; \ - ${ECHO_WRAPPER_MSG} "Warning: unable to create \`$${wrappee}' wrapper script"; \ + ${ECHO_WRAPPER_MSG} "Warning: unable to create ${_wrappee_} wrapper script: \`$$wrappee'"; \ fi; \ ;; \ esac; \ case $$gen_wrapper in \ yes) \ - ${MKDIR} ${WRAPPER_${_wrappee_}:H}; \ + ${MKDIR} `${DIRNAME} $$wrapper`; \ ${CAT} ${_WRAPPER_SH.${_wrappee_}} | \ ${SED} ${_WRAP_SUBST_SED.${_wrappee_}} \ - -e "s|@WRAPPEE@|$${absdir}${_WRAP_PKG_${_wrappee_}:Q}|g" | \ + -e "s|@WRAPPEE@|$$wrappee|g" | \ ${_WRAP_SH_CRUNCH_FILTER} \ - > ${WRAPPER_${_wrappee_}}; \ - ${CHMOD} +x ${WRAPPER_${_wrappee_}}; \ + > $$wrapper; \ + ${CHMOD} +x $$wrapper; \ ;; \ esac ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} @@ -389,13 +392,14 @@ ${_WRAP_COOKIE.${_wrappee_}}: \ do-wrapper: ${_alias_} ${_alias_}: ${_WRAP_COOKIE.${_wrappee_}} ${_PKG_SILENT}${_PKG_DEBUG} \ - if [ ! -x ${_alias_} -a -x ${WRAPPER_${_wrappee_}} ]; then \ - ${ECHO_WRAPPER_MSG} "=> Linking wrapper: ${_alias_}"; \ - ${LN} -f ${WRAPPER_${_wrappee_}} ${_alias_}; \ + wrapper="${WRAPPER_${_wrappee_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}"; \ + if [ ! -x ${.TARGET} -a -x $$wrapper ]; then \ + ${ECHO_WRAPPER_MSG} "=> Linking ${_wrappee_} wrapper: ${.TARGET}"; \ + ${LN} -f $$wrapper ${.TARGET}; \ fi . endif . endfor -.endfor # _WRAPPEES +.endfor # _WRAPPEES_UNIQUE .for _target_ in ${WRAPPER_TARGETS} do-wrapper: ${_target_} |