[PC-BSD Commits] r14081 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Wed Nov 30 09:39:38 PST 2011


Author: kris
Date: 2011-11-30 09:39:38 -0800 (Wed, 30 Nov 2011)
New Revision: 14081

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:


Test to be sure ccache is installed properly



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-11-30 17:29:43 UTC (rev 14080)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-11-30 17:39:38 UTC (rev 14081)
@@ -1609,21 +1609,25 @@
 	# Check if using ccache directory
 	if [ -d "/.ccache" ] ; then
 		echo "Enabling ccache..."
-		cd /usr/ports/devel/ccache && make install clean >/dev/null 2>/dev/null
+		cd /usr/ports/devel/ccache 
+		make install clean
+		if [ $? -eq 0 ] ; then
+			# Setup environment variables
+			CCACHE_PATH="/usr/bin:/usr/local/bin"
+			export CCACHE_PATH
+			CCACHE_DIR="/.ccache"
+			export CCACHE_DIR
+			PATH="/usr/local/libexec/ccache:${PATH}"
+			export PATH
 
-		# Setup environment variables
-		CCACHE_PATH="/usr/bin:/usr/local/bin"
-		export CCACHE_PATH
-		CCACHE_DIR="/.ccache"
-		export CCACHE_DIR
-		PATH="/usr/local/libexec/ccache:${PATH}"
-		export PATH
-
-		# Setup make configuration
-		echo ".if !defined(NO_CCACHE)" >> ${MAKE_CONF}
-		echo "  CC=/usr/local/libexec/ccache/world-cc" >> ${MAKE_CONF}
-		echo "  CXX=/usr/local/libexec/ccache/world-c++" >> ${MAKE_CONF}
-		echo ".endif" >> ${MAKE_CONF}
+			# Setup make configuration
+			echo ".if !defined(NO_CCACHE)" >> ${MAKE_CONF}
+			echo "  CC=/usr/local/libexec/ccache/world-cc" >> ${MAKE_CONF}
+			echo "  CXX=/usr/local/libexec/ccache/world-c++" >> ${MAKE_CONF}
+			echo ".endif" >> ${MAKE_CONF}
+		else
+			echo "Failed installing ccache! Continuing without it..."
+		fi
 	fi
 
 	PATH="${PATH}:/usr/local/bin:/usr/local/sbin:${LOCALBASE}/bin:${LOCALBASE}/sbin"



More information about the Commits mailing list