diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-09-13 15:24:59 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-09-13 15:24:59 +0000 |
commit | 022463b46c3911830d6144acd1c2957ac9fe1f2d (patch) | |
tree | 5c4f87f0ece2f7f4df42626b747efe07fe7a9812 /tools/checkwps | |
parent | c0f1c49178b4c205e1c990ea2fb25a417305528c (diff) | |
download | rockbox-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
Diffstat (limited to 'tools/checkwps')
-rw-r--r-- | tools/checkwps/Makefile | 36 | ||||
-rwxr-xr-x | tools/checkwps/buildall.sh | 46 | ||||
-rwxr-xr-x | tools/checkwps/cleanall.sh | 7 | ||||
-rw-r--r-- | tools/checkwps/targets.txt | 6 |
4 files changed, 52 insertions, 43 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 | |||
10 | ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) | ||
11 | CFLAGS+=-mno-cygwin | ||
12 | EXT = .exe | ||
13 | else | ||
14 | ifeq ($(findstring MINGW,$(shell uname)),MINGW) | ||
15 | EXT = .exe | ||
16 | CC = mingw32-gcc | ||
17 | endif | ||
18 | endif | ||
19 | |||
20 | # This is a wrapper for checkwps.make | ||
21 | APPSDIR=. | ||
22 | ROOTDIR=../.. | ||
23 | BUILDDIR=. | ||
24 | BINARY=checkwps.$(MODELNAME)$(EXT) | ||
25 | HOSTCC=$(CC) | ||
26 | TARGET=-D$(TARGETNAME) | ||
27 | include checkwps.make | ||
28 | |||
29 | all: | ||
30 | @echo To build, run the buildall.sh script | ||
31 | |||
32 | checkwps: $(BUILDDIR)/$(BINARY) | ||
33 | @echo foo > /dev/null | ||
34 | |||
35 | clean: | ||
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 |
2 | rootdir=`dirname $0` | 2 | rootdir=`dirname $0` |
3 | toolsdir=$rootdir/.. | ||
4 | outdir=$rootdir/output | ||
5 | jobs="1" | ||
6 | err="0" | ||
7 | |||
8 | mkdir -p $outdir | ||
9 | |||
10 | print_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 | |||
19 | EOF | ||
20 | exit | ||
21 | } | ||
22 | |||
23 | for 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 | ||
29 | done | ||
30 | |||
31 | if [ -z $jobs ] || [ $jobs -le "0" ] | ||
32 | then | ||
33 | echo "[ERROR] jobs must be a positive number" | ||
34 | err="1" | ||
35 | fi | ||
36 | |||
37 | if [ $err -ge "1" ] | ||
38 | then | ||
39 | echo "An error occured. Aborting" | ||
40 | exit | ||
41 | fi | ||
3 | 42 | ||
4 | cat $rootdir/targets.txt | ( | 43 | cat $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 |
2 | rootdir=`dirname $0` | 2 | rootdir=`dirname $0` |
3 | outdir=$rootdir/output | ||
3 | 4 | ||
5 | make clean # make clean the build dir first | ||
6 | rm -f autoconf.h | ||
7 | rm -f Makefile | ||
4 | cat $rootdir/targets.txt | ( | 8 | cat $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 | |||
26 | MROBE_500 mrobe500 | 26 | MROBE_500 mrobe500 |
27 | MROBE_100 mrobe100 | 27 | MROBE_100 mrobe100 |
28 | LOGIK_DAX logikdax | 28 | LOGIK_DAX logikdax |
29 | CREATIVE_ZVM creativezvm | 29 | CREATIVE_ZVM creativezvm30gb |
30 | CREATIVE_ZVM60GB creativezvm60 | 30 | CREATIVE_ZVM60GB creativezvm60gb |
31 | CREATIVE_ZV creativezv | 31 | CREATIVE_ZV creativezenvision |
32 | SANSA_E200 e200 | 32 | SANSA_E200 e200 |
33 | SANSA_E200 e200r | 33 | SANSA_E200 e200r |
34 | SANSA_C200 c200 | 34 | SANSA_C200 c200 |