summaryrefslogtreecommitdiffstats
path: root/tools/checkwps/buildall.sh
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-13 15:24:59 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-13 15:24:59 +0000
commit022463b46c3911830d6144acd1c2957ac9fe1f2d (patch)
tree5c4f87f0ece2f7f4df42626b747efe07fe7a9812 /tools/checkwps/buildall.sh
parentc0f1c49178b4c205e1c990ea2fb25a417305528c (diff)
downloadrockbox-022463b46c3911830d6144acd1c2957ac9fe1f2d.tar.gz
rockbox-022463b46c3911830d6144acd1c2957ac9fe1f2d.tar.bz2
rockbox-022463b46c3911830d6144acd1c2957ac9fe1f2d.zip
Repair build-all.sh and clean-all.sh.
Make it so that it runs ../configure and make for each target. This makes the wrapper-Makefile obsolete. It moves the binaries to tools/checkwps/output. NOTE: Something is fishy with the creative players (it builds them, but can't move them), because the configure target name and modelname differs (not sure how to fix that). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22696 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/checkwps/buildall.sh')
-rwxr-xr-xtools/checkwps/buildall.sh46
1 files changed, 43 insertions, 3 deletions
diff --git a/tools/checkwps/buildall.sh b/tools/checkwps/buildall.sh
index b66bee224c..9bc937fa56 100755
--- a/tools/checkwps/buildall.sh
+++ b/tools/checkwps/buildall.sh
@@ -1,11 +1,51 @@
#!/bin/sh
rootdir=`dirname $0`
+toolsdir=$rootdir/..
+outdir=$rootdir/output
+jobs="1"
+err="0"
+
+mkdir -p $outdir
+
+print_help() {
+ echo "Build Checkwps for every target in targets.txt."
+ echo "The binaries are put into in '$outdir'"
+ echo ""
+ cat <<EOF
+ Usage: build-all.sh [OPTION]...
+ Options:
+ --jobs=NUMBER Let make use NUMBER jobs (default is 1)
+
+EOF
+exit
+}
+
+for arg in "$@"; do
+ case "$arg" in
+ --jobs=*) jobs=`echo "$arg" | cut -d = -f 2`;;
+ -h|--help) print_help;;
+ *) err="1"; echo "[ERROR] Option '$arg' unsupported";;
+ esac
+done
+
+if [ -z $jobs ] || [ $jobs -le "0" ]
+then
+ echo "[ERROR] jobs must be a positive number"
+ err="1"
+fi
+
+if [ $err -ge "1" ]
+then
+ echo "An error occured. Aborting"
+ exit
+fi
cat $rootdir/targets.txt | (
while read target model
do
- rm -f checkwps.$model
- make -s -C $rootdir MODELNAME=$model TARGETNAME=$target checkwps
- mv $rootdir/checkwps.$model ./checkwps.$model > /dev/null 2>&1
+ make -j $jobs clean
+ $toolsdir/configure --target=$model --type=C --ram=32 # 32 should always give default RAM
+ make -j $jobs
+ mv checkwps.$model $outdir
done
)