Date: Wed, 31 Mar 2004 21:21:22 -0800 From: "Jacob S. Barrett" <jbarrett@amduat.net> To: michael johnson <ahze@ahze.net> Cc: ports@freebsd.org Subject: Re: Ports with distcc Message-ID: <200403312121.22340.jbarrett@amduat.net> In-Reply-To: <810F1404-8395-11D8-8C1C-000A958C81C6@ahze.net> References: <200403311951.52865.jbarrett@amduat.net> <810F1404-8395-11D8-8C1C-000A958C81C6@ahze.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Boundary-00=_Sb6aAsB85caIiCz Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wednesday 31 March 2004 08:31 pm, michael johnson <ahze@ahze.net> wrote: > I agree we need support for distcc and maybe ccache in ports but your > patch wouldn't work > for people like me who set > CC="/usr/local/bin/ccache /bin/cc" in /etc/make.conf and > export CCACHE_PREFIX=distcc in /etc/profile Here is a patch that allows you to do distcc and/or ccache. -- Jacob S. Barrett jbarrett@amduat.net www.amduat.net "I don't suffer from insanity, I enjoy every minute of it." --Boundary-00=_Sb6aAsB85caIiCz Content-Type: text/x-diff; charset="iso-8859-1"; name="bsd.port.mk.distcc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bsd.port.mk.distcc.patch" --- bsd.port.mk.orig Wed Mar 31 19:26:46 2004 +++ bsd.port.mk Wed Mar 31 21:19:40 2004 @@ -453,7 +453,18 @@ # If WITH_APACHE2 is defined defaults to www/apache2 # APXS - Full path to the prefered apxs binary to configure # apache modules. Default: ${LOCALBASE}/sbin/apxs -# +# +# SUPPORTS_MAKE_CONCURRENCY - Port flag that indicates that it is compatible with +# make job concurrency. +# WITH_MAKE_CONCURRENCY - If a port has SUPPORTS_MAKE_CONCURRENCY this flag enables +# it to be execute make with -j. +# WITH_DISTCC - If USE_MAKE_CONCURRENCY and SUPPORTS_MAKE_CONCURRENCY are +# are set then this will enable the use of distcc to distribute +# the port build across multiple machines. +# NO_DISTCC - The port supports make concurrency but does not build with +# distcc for some reason. +# +# WITH_CCACHE - Enables the use of ccache. # # # Dependency checking. Use these if your port requires another port @@ -1907,6 +1918,22 @@ MD5_FILE?= ${MASTERDIR}/distinfo MAKE_FLAGS?= -f +.if defined(SUPPORTS_MAKE_CONCURRENCY) +.if defined(WITH_MAKE_CONCURRENCY) +MAKE_CONCURRENCY_JOBS?= 8 +MAKE_FLAGS:= -j${MAKE_CONCURRENCY_JOBS} ${MAKE_FLAGS} +.endif +.if defined(WITH_DISTCC) && !defined(NO_DISTCC) +DISTCC?= /usr/local/bin/distcc +CC:= ${DISTCC} ${CC} +CXX:= ${DISTCC} ${CXX} +.endif +.endif +.if defined(WITH_CCACHE) +CCACHE?= /usr/local/bin/ccache +CC:= ${CCACHE} ${CC} +CXX:= ${CCACHE} ${CXX} +.endif MAKEFILE?= Makefile MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}" --Boundary-00=_Sb6aAsB85caIiCz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403312121.22340.jbarrett>