Patchwork [U-Boot,2/2] common: Use separate dirs for each board for ccache

login
register
mail settings
Submitter Marek Vasut
Date May 20, 2013, 5:25 p.m.
Message ID <1369070715-9585-3-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/245080/
State Changes Requested
Delegated to: Wolfgang Denk
Headers show

Comments

Marek Vasut - May 20, 2013, 5:25 p.m.
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 <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
---
 MAKEALL |    7 +++++++
 1 file changed, 7 insertions(+)
Marek Vasut - May 20, 2013, 6:09 p.m.
Dear Marek Vasut,

> 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 <marex@denx.de>
> Cc: Tom Rini <trini@ti.com>

This one will need more work, sorry.

Best regards,
Marek Vasut
Wolfgang Denk - May 21, 2013, 12:45 p.m.
Dear Marek Vasut,

In message <1369070715-9585-3-git-send-email-marex@denx.de> you wrote:

> +	# Use per-board CCACHE directory
> +	if [ "x${CCACHE}" != "x" ] ; then

Why not simply:

	if [ "${CCACHE}" ] ; then

?

> +		export CCACHE_DIR="`${CCACHE} -s | grep "^cache directory" | \
> +				tr -s " " | cut -d " " -f 3`/u-boot/${target}" ;
> +		mkdir -p "${CCACHE_DIR}"
> +	fi

How can I cleanup all the mess of created files and directories after
a build?

Best regards,

Wolfgang Denk
Marek Vasut - May 21, 2013, 3:05 p.m.
Dear Wolfgang Denk,

> Dear Marek Vasut,
> 
> In message <1369070715-9585-3-git-send-email-marex@denx.de> you wrote:
> > +	# Use per-board CCACHE directory
> > +	if [ "x${CCACHE}" != "x" ] ; then
> 
> Why not simply:
> 
> 	if [ "${CCACHE}" ] ; then
> 
> ?
> 
> > +		export CCACHE_DIR="`${CCACHE} -s | grep "^cache directory" | \
> > +				tr -s " " | cut -d " " -f 3`/u-boot/${target}" ;
> > +		mkdir -p "${CCACHE_DIR}"
> > +	fi
> 
> How can I cleanup all the mess of created files and directories after
> a build?

Ignoring this patch, it's FUBAR, sorry.

Best regards,
Marek Vasut

Patch

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