From owner-freebsd-ports@FreeBSD.ORG Wed Mar 31 21:21:24 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 019C816A4CE for ; Wed, 31 Mar 2004 21:21:24 -0800 (PST) Received: from bes.amduat.net (bes.amduat.net [206.124.149.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7891143D46 for ; Wed, 31 Mar 2004 21:21:23 -0800 (PST) (envelope-from jbarrett@amduat.net) Received: from osiris.amduat.net (osiris.amduat.net [10.0.0.69]) (AUTH: LOGIN jbarrett, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by bes.amduat.net with esmtp; Wed, 31 Mar 2004 21:21:22 -0800 From: "Jacob S. Barrett" To: michael johnson Date: Wed, 31 Mar 2004 21:21:22 -0800 User-Agent: KMail/1.6.1 References: <200403311951.52865.jbarrett@amduat.net> <810F1404-8395-11D8-8C1C-000A958C81C6@ahze.net> In-Reply-To: <810F1404-8395-11D8-8C1C-000A958C81C6@ahze.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_Sb6aAsB85caIiCz" Message-Id: <200403312121.22340.jbarrett@amduat.net> cc: ports@freebsd.org Subject: Re: Ports with distcc X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2004 05:21:24 -0000 --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 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--