summaryrefslogtreecommitdiff
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
parentc0f1c49178b4c205e1c990ea2fb25a417305528c (diff)
downloadrockbox-022463b46c3911830d6144acd1c2957ac9fe1f2d.tar.gz
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
-rw-r--r--tools/checkwps/Makefile36
-rwxr-xr-xtools/checkwps/buildall.sh46
-rwxr-xr-xtools/checkwps/cleanall.sh7
-rw-r--r--tools/checkwps/targets.txt6
-rw-r--r--tools/root.make2
5 files changed, 53 insertions, 44 deletions
diff --git a/tools/checkwps/Makefile b/tools/checkwps/Makefile
deleted file mode 100644
index faa75efac3..0000000000
--- a/tools/checkwps/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
11CFLAGS+=-mno-cygwin
12EXT = .exe
13else
14ifeq ($(findstring MINGW,$(shell uname)),MINGW)
15EXT = .exe
16CC = mingw32-gcc
17endif
18endif
19
20# This is a wrapper for checkwps.make
21APPSDIR=.
22ROOTDIR=../..
23BUILDDIR=.
24BINARY=checkwps.$(MODELNAME)$(EXT)
25HOSTCC=$(CC)
26TARGET=-D$(TARGETNAME)
27include checkwps.make
28
29all:
30 @echo To build, run the buildall.sh script
31
32checkwps: $(BUILDDIR)/$(BINARY)
33 @echo foo > /dev/null
34
35clean:
36 rm -f checkwps.$(MODELNAME)$(EXT)
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 @@
1#!/bin/sh 1#!/bin/sh
2rootdir=`dirname $0` 2rootdir=`dirname $0`
3toolsdir=$rootdir/..
4outdir=$rootdir/output
5jobs="1"
6err="0"
7
8mkdir -p $outdir
9
10print_help() {
11 echo "Build Checkwps for every target in targets.txt."
12 echo "The binaries are put into in '$outdir'"
13 echo ""
14 cat <<EOF
15 Usage: build-all.sh [OPTION]...
16 Options:
17 --jobs=NUMBER Let make use NUMBER jobs (default is 1)
18
19EOF
20exit
21}
22
23for arg in "$@"; do
24 case "$arg" in
25 --jobs=*) jobs=`echo "$arg" | cut -d = -f 2`;;
26 -h|--help) print_help;;
27 *) err="1"; echo "[ERROR] Option '$arg' unsupported";;
28 esac
29done
30
31if [ -z $jobs ] || [ $jobs -le "0" ]
32then
33 echo "[ERROR] jobs must be a positive number"
34 err="1"
35fi
36
37if [ $err -ge "1" ]
38then
39 echo "An error occured. Aborting"
40 exit
41fi
3 42
4cat $rootdir/targets.txt | ( 43cat $rootdir/targets.txt | (
5 while read target model 44 while read target model
6 do 45 do
7 rm -f checkwps.$model 46 make -j $jobs clean
8 make -s -C $rootdir MODELNAME=$model TARGETNAME=$target checkwps 47 $toolsdir/configure --target=$model --type=C --ram=32 # 32 should always give default RAM
9 mv $rootdir/checkwps.$model ./checkwps.$model > /dev/null 2>&1 48 make -j $jobs
49 mv checkwps.$model $outdir
10 done 50 done
11) 51)
diff --git a/tools/checkwps/cleanall.sh b/tools/checkwps/cleanall.sh
index 860c3afae2..19a3aec6fb 100755
--- a/tools/checkwps/cleanall.sh
+++ b/tools/checkwps/cleanall.sh
@@ -1,9 +1,14 @@
1#!/bin/sh 1#!/bin/sh
2rootdir=`dirname $0` 2rootdir=`dirname $0`
3outdir=$rootdir/output
3 4
5make clean # make clean the build dir first
6rm -f autoconf.h
7rm -f Makefile
4cat $rootdir/targets.txt | ( 8cat $rootdir/targets.txt | (
5 while read target model 9 while read target model
6 do 10 do
7 rm -f checkwps.$model 11 rm -f $outdir/checkwps.$model # then delete any output/checkwps.*
12 rmdir $outdir > /dev/null 2>&1
8 done 13 done
9) 14)
diff --git a/tools/checkwps/targets.txt b/tools/checkwps/targets.txt
index d14cff93b8..33684b75a7 100644
--- a/tools/checkwps/targets.txt
+++ b/tools/checkwps/targets.txt
@@ -26,9 +26,9 @@ GIGABEAT_S gigabeats
26MROBE_500 mrobe500 26MROBE_500 mrobe500
27MROBE_100 mrobe100 27MROBE_100 mrobe100
28LOGIK_DAX logikdax 28LOGIK_DAX logikdax
29CREATIVE_ZVM creativezvm 29CREATIVE_ZVM creativezvm30gb
30CREATIVE_ZVM60GB creativezvm60 30CREATIVE_ZVM60GB creativezvm60gb
31CREATIVE_ZV creativezv 31CREATIVE_ZV creativezenvision
32SANSA_E200 e200 32SANSA_E200 e200
33SANSA_E200 e200r 33SANSA_E200 e200r
34SANSA_C200 c200 34SANSA_C200 c200
diff --git a/tools/root.make b/tools/root.make
index e2525dc8df..f0f2c3310b 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -118,7 +118,7 @@ veryclean: clean
118clean: 118clean:
119 $(SILENT)echo Cleaning build directory 119 $(SILENT)echo Cleaning build directory
120 $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \ 120 $(SILENT)rm -rf rockbox.zip rockbox.7z rockbox.tar rockbox.tar.gz \
121 rockbox.tar.bz2 TAGS apps firmware comsim sim lang \ 121 rockbox.tar.bz2 TAGS apps firmware tools comsim sim lang \
122 manual *.pdf *.a credits.raw rockbox.ipod bitmaps \ 122 manual *.pdf *.a credits.raw rockbox.ipod bitmaps \
123 pluginbitmaps UI256.bmp rockbox-full.zip html txt \ 123 pluginbitmaps UI256.bmp rockbox-full.zip html txt \
124 rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \ 124 rockbox-manual*.zip sysfont.h rockbox-info.txt voicefontids \