pkgsrc/mk/compiler/distcc.mk

78 lines
1.9 KiB
Makefile
Raw Normal View History

# $NetBSD: distcc.mk,v 1.11 2004/02/05 03:39:17 jlam Exp $
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
.if !defined(COMPILER_DISTCC_MK)
COMPILER_DISTCC_MK= one
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
. if !empty(PKGPATH:Mdevel/distcc)
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
IGNORE_DISTCC= yes
MAKEFLAGS+= IGNORE_DISTCC=yes
. endif
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
. if defined(IGNORE_DISTCC)
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
_USE_DISTCC= NO
. endif
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
# LANGUAGES.<compiler> is the list of supported languages by the compiler.
# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the ones
# requested by the package in USE_LANGUAGES.
#
LANGUAGES.distcc= c c++
_LANGUAGES.distcc= # empty
. for _lang_ in ${USE_LANGUAGES}
_LANGUAGES.distcc+= ${LANGUAGES.distcc:M${_lang_}}
. endfor
. if empty(_LANGUAGES.distcc)
2004-02-02 13:47:19 +01:00
_USE_DISTCC= NO
. endif
. if !defined(_USE_DISTCC)
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
_USE_DISTCC= YES
. endif
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
. if !empty(_USE_DISTCC:M[yY][eE][sS])
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
EVAL_PREFIX+= _DISTCCBASE=distcc
_DISTCCBASE_DEFAULT= ${LOCALBASE}
_DISTCCBASE?= ${LOCALBASE}
. if exists(${_DISTCCBASE}/bin/distcc)
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
_DISTCC_DIR= ${WRKDIR}/.distcc
2004-02-02 12:03:08 +01:00
_DISTCC_LINKS= # empty
. if !empty(_LANGUAGES.distcc:Mc)
CC:= ${_DISTCC_DIR}/bin/${CC:T}
_DISTCC_LINKS+= CC
. endif
. if !empty(_LANGUAGES.distcc:Mc++)
CXX:= ${_DISTCC_DIR}/bin/${CXX:T}
_DISTCC_LINKS+= CXX
. endif
. endif
2004-02-02 11:55:26 +01:00
. endif
.endif # COMPILER_DISTCC_MK
# The following section is included only if we're not being included by
# bsd.prefs.mk.
#
.if empty(BSD_PREFS_MK)
. if empty(COMPILER_DISTCC_MK:Mtwo)
COMPILER_DISTCC_MK+= two
. if !empty(_USE_DISTCC:M[yY][eE][sS])
. if !empty(_LANGUAGES.distcc)
PATH:= ${_DISTCC_DIR}/bin:${PATH}
. endif
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
BUILD_DEPENDS+= distcc-[0-9]*:../../devel/distcc
. if exists(${_DISTCCBASE}/bin/distcc)
. for _target_ in ${_DISTCC_LINKS}
New compiler specification framework, based on mk/compiler.mk. The changes from the old compiler.mk are: * Split apart the compiler-specific logic into separate files. This should make supporting other compilers a bit easier. * Deprecate all of the USE_* compiler.mk variables, e.g. USE_GCC[23], USE_SUNPRO, etc. It's all replaced with a new PKGSRC_COMPILER variable. * Clean up the GCC handling so that it's all controlled by a single variable GCC_REQD. The following behaviour is expected: (a) If USE_PKGSRC_GCC is defined, then pretend there is no GCC on the system. (b) If there is no GCC, then the appropriate GCC corresponding to GCC_REQD is installed and used. (c) If there is a GCC, if it satisfies GCC_REQD, then use it; otherwise install and use the appropriate GCC package. (d) If lang/gcc is installed and GCC_REQD > 2.95.3, then lang/gcc3 is installed and used. (e) If lang/gcc3 is installed and GCC_REQD = 2.95.3, then gcc3 is still used instead of installing lang/gcc. New features include: * PKGSRC_COMPILER takes a list of values specifying the chain of compilers to call when building packages. Valid values are: distcc distributed C/C++ (chainable) ccache compiler cache (chainable) gcc GNU mipspro Silicon Graphics, Inc. MIPSpro sunpro Sun Microsystems, Inc. WorkShip/Forte/Sun ONE Studio The default is "gcc". You can use ccache and/or distcc with an appropriate PKGSRC_COMPILER setting, e.g. "ccache distcc gcc". * Change GCC_REQD to hold a list of values that we scan through to find the highest version of GCC required by the build. Package Makefiles should now do "GCC_REQD+=..." instead of "GCC_REQD=...".
2004-02-01 01:31:00 +01:00
override-tools: ${${_target_}}
${${_target_}}:
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
${_PKG_SILENT}${_PKG_DEBUG} \
${LN} -fs ${_DISTCCBASE}/bin/distcc ${.TARGET}
. endfor
. endif
. endif
. endif # COMPILER_DISTCC_MK
.endif # BSD_PREFS_MK