Subversion Repositories HelenOS-historic

Rev

Rev 547 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 547 Rev 550
Line 1... Line 1...
1
#! /bin/sh
1
#! /bin/sh
2
 
2
 
3
function syntax {
3
function syntax {
4
	echo "Syntax:"
4
	echo "Syntax:"
5
	echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>] [-machine <machine>]"
-
 
6
	echo
5
	echo " build "
7
	echo "<arch>     ... amd64, ia32, ia64, mips32, ppc32, sparc64"
-
 
8
	echo "<compiler> ... native, *cross"
-
 
9
	echo "<cpu>      ... for ia32: athlon-xp, athlon-mp, pentium3, *pentium4, prescott"
-
 
10
	echo "<machine>  ... for mips32: *msim, msim4kc, simics, lgxemul, bgxemul, indy"
-
 
11
	echo
6
	echo
12
}
7
}
13
 
8
 
14
ARCH="`basename "$0" | awk -F. '{ if (NF > 1) print \$NF }'`"
-
 
15
if [ -z "$ARCH" ]; then
-
 
16
	syntax
-
 
17
	exit 1
-
 
18
fi
-
 
19
 
-
 
20
ARGS=""
9
ARGS=""
21
while [ "$#" -gt 0 ]; do
10
while [ "$#" -gt 0 ]; do
22
	case "$1" in
11
	case "$1" in
23
		-compiler)
-
 
24
			if [ -z "$2" ]; then
-
 
25
				syntax
-
 
26
				exit 1
-
 
27
			fi
-
 
28
			ARGS="$ARGS COMPILER=$2"
-
 
29
			shift
-
 
30
			;;
-
 
31
		-cpu)
-
 
32
			if [ -z "$2" ]; then
-
 
33
				syntax
-
 
34
				exit 1
-
 
35
			fi
-
 
36
			ARGS="$ARGS CPU=$2"
-
 
37
			shift
-
 
38
			;;
-
 
39
		-machine)
-
 
40
			if [ -z "$2" ]; then
-
 
41
				syntax
-
 
42
				exit 1
-
 
43
			fi
-
 
44
			ARGS="$ARGS MACHINE=$2"
-
 
45
			shift
-
 
46
			;;
-
 
47
		*)
12
		*)
48
			syntax
13
			syntax
49
			exit 1
14
			exit 1
50
			;;
15
			;;
51
	esac
16
	esac
Line 58... Line 23...
58
	TAG="Built on $TIMESTAMP for $ARCH"
23
	TAG="Built on $TIMESTAMP for $ARCH"
59
else
24
else
60
	TAG="Revision $TAG (built on $TIMESTAMP for $ARCH)"
25
	TAG="Revision $TAG (built on $TIMESTAMP for $ARCH)"
61
fi
26
fi
62
 
27
 
63
tools/config.py $ARCH default
28
tools/config.py default
64
make all "ARCH=$ARCH" "TAG=$TAG" $ARGS
29
make all "TAG=$TAG" $ARGS