From: Marek Vasut Date: Mon, 20 May 2013 19:25:15 +0200 Subject: [U-Boot] [PATCH 2/2] common: Use separate dirs for each board for ccache In-Reply-To: <1369070715-9585-1-git-send-email-marex@denx.de> References: <1369070715-9585-1-git-send-email-marex@denx.de> Message-ID: <1369070715-9585-3-git-send-email-marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When using ccache in MAKEALL, use separate directory for the cache for each board. This way we can avoid rewriting the same files by building other boards. Signed-off-by: Marek Vasut Cc: Tom Rini --- MAKEALL | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAKEALL b/MAKEALL index 2737eab..b945007 100755 --- a/MAKEALL +++ b/MAKEALL @@ -673,6 +673,13 @@ build_target() { MAKE=make fi + # Use per-board CCACHE directory + if [ "x${CCACHE}" != "x" ] ; then + export CCACHE_DIR="`${CCACHE} -s | grep "^cache directory" | \ + tr -s " " | cut -d " " -f 3`/u-boot/${target}" ; + mkdir -p "${CCACHE_DIR}" + fi + ${MAKE} distclean >/dev/null ${MAKE} -s ${target}_config -- 1.7.10.4