2,11 → 2,12 |
|
function syntax { |
echo "Syntax:" |
echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>]" |
echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>] [-machine <machine>]" |
echo |
echo "<arch> ... amd64, *ia32, ia64, mips32, ppc32, sparc64" |
echo "<compiler> ... native, *cross" |
echo "<cpu> ... for ia32: athlon-xp, athlon-mp, pentium3, *pentium4" |
echo "<cpu> ... for ia32: athlon-xp, athlon-mp, pentium3, *pentium4, prescott" |
echo "<machine> ... for mips32: *msim, msim4kc, simics, lgxemul, bgxemul, indy" |
echo |
} |
|
20,13 → 21,29 |
while [ "$#" -gt 0 ]; do |
case "$1" in |
-compiler) |
if [ -z "$2" ]; then |
syntax |
exit 1 |
fi |
ARGS="$ARGS COMPILER=$2" |
shift |
;; |
-cpu) |
if [ -z "$2" ]; then |
syntax |
exit 1 |
fi |
ARGS="$ARGS CPU=$2" |
shift |
;; |
-machine) |
if [ -z "$2" ]; then |
syntax |
exit 1 |
fi |
ARGS="$ARGS MACHINE=$2" |
shift |
;; |
*) |
syntax |
exit 1 |