[PATCH] [RFC] build with ccache
Nelson Castillo
arhuaco at freaks-unidos.net
Sun Mar 1 18:50:27 CET 2009
From: Nelson Castillo <arhuaco at freaks-unidos.net>
ccache saves me a lot of time ( http://ccache.samba.org ).
Any reason for not having this in the build script?
This patch:
~ redirects build script messages to stderr
~ adds ccache support
Signed-off-by: Nelson Castillo <arhuaco at freaks-unidos.net>
---
build | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/build b/build
index b0e49eb..48c2d27 100755
--- a/build
+++ b/build
@@ -17,16 +17,25 @@
PARALLEL=16
if [ -z "$1" ] ; then
- echo "Specify the build subdir, eg, GTA02 which contains the .config"
- echo "and will hold the object files"
+ echo "Specify the build subdir, eg, GTA02 which contains the .config" 1>&2
+ echo "and will hold the object files" 1>&2
exit 1
fi
mkdir -p $1
if [ -z "$CROSS_COMPILE" ]; then
- export CROSS_COMPILE=/usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-
+ CCACHE=`which ccache`
+ if [ -z "$CCACHE" ]; then
+ echo "ccache not found. Install it if you build this kernel often" 1>&2
+ else
+ echo "ccache found at $CCACHE. Using it for this build" 1>&2
+
+ fi
+ export CROSS_COMPILE="$CCACHE /usr/local/openmoko/arm/bin/arm-angstrom-linux-gnueabi-"
fi
+
+echo -e "Starting build\n" 1>&2
make O=$1 ARCH=arm silentoldconfig
#
@@ -61,7 +70,7 @@ if [ ! -z "`grep CONFIG_MACH_M800=y $1/.config`" ] ; then
fi
if [ -z "$PRODUCT" ] ; then
- echo "Unable to figure out what we are building from the config"
+ echo "Unable to figure out what we are building from the config" 1>&2
exit 1
fi
@@ -90,7 +99,7 @@ if [ -d .git ] ; then
fi
-echo $MKIMAGECMD
+echo $MKIMAGECMD 1>&2
#
# actually make it
More information about the openmoko-kernel
mailing list