Subversion Repositories HelenOS-historic

Rev

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

Rev 455 Rev 457
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>]"
5
	echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>] [-machine <machine>]"
6
	echo
6
	echo
7
	echo "<arch>     ... amd64, *ia32, ia64, mips32, ppc32, sparc64"
7
	echo "<arch>     ... amd64, *ia32, ia64, mips32, ppc32, sparc64"
8
	echo "<compiler> ... native, *cross"
8
	echo "<compiler> ... native, *cross"
9
	echo "<cpu>      ... for ia32: athlon-xp, athlon-mp, pentium3, *pentium4"
9
	echo "<cpu>      ... for ia32: athlon-xp, athlon-mp, pentium3, *pentium4, prescott"
-
 
10
	echo "<machine>  ... for mips32: *msim, msim4kc, simics, lgxemul, bgxemul, indy"
10
	echo
11
	echo
11
}
12
}
12
 
13
 
13
ARCH="`basename "$0" | awk -F. '{ if (NF > 1) print \$NF }'`"
14
ARCH="`basename "$0" | awk -F. '{ if (NF > 1) print \$NF }'`"
14
if [ -z "$ARCH" ]; then
15
if [ -z "$ARCH" ]; then
Line 18... Line 19...
18
 
19
 
19
ARGS=""
20
ARGS=""
20
while [ "$#" -gt 0 ]; do
21
while [ "$#" -gt 0 ]; do
21
	case "$1" in
22
	case "$1" in
22
		-compiler)
23
		-compiler)
-
 
24
			if [ -z "$2" ]; then
-
 
25
				syntax
-
 
26
				exit 1
-
 
27
			fi
23
			ARGS="$ARGS COMPILER=$2"
28
			ARGS="$ARGS COMPILER=$2"
24
			shift
29
			shift
25
			;;
30
			;;
26
		-cpu)
31
		-cpu)
-
 
32
			if [ -z "$2" ]; then
-
 
33
				syntax
-
 
34
				exit 1
-
 
35
			fi
27
			ARGS="$ARGS CPU=$2"
36
			ARGS="$ARGS CPU=$2"
28
			shift
37
			shift
29
			;;
38
			;;
-
 
39
		-machine)
-
 
40
			if [ -z "$2" ]; then
-
 
41
				syntax
-
 
42
				exit 1
-
 
43
			fi
-
 
44
			ARGS="$ARGS MACHINE=$2"
-
 
45
			shift
-
 
46
			;;
30
		*)
47
		*)
31
			syntax
48
			syntax
32
			exit 1
49
			exit 1
33
			;;
50
			;;
34
	esac
51
	esac