lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
|
Last change
on this file since 090e7ea1 was 795ff98, checked in by Ondrej Palkovsky <ondrap@…>, 20 years ago |
|
Added conditions to config system.
|
-
Property mode
set to
100755
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | #! /bin/sh
|
|---|
| 2 |
|
|---|
| 3 | function syntax {
|
|---|
| 4 | echo "Syntax:"
|
|---|
| 5 | echo " build.<arch> [-compiler <compiler>] [-cpu <cpu>] [-machine <machine>]"
|
|---|
| 6 | echo
|
|---|
| 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
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 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=""
|
|---|
| 21 | while [ "$#" -gt 0 ]; do
|
|---|
| 22 | 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 | *)
|
|---|
| 48 | syntax
|
|---|
| 49 | exit 1
|
|---|
| 50 | ;;
|
|---|
| 51 | esac
|
|---|
| 52 | shift
|
|---|
| 53 | done
|
|---|
| 54 |
|
|---|
| 55 | TAG="`svnversion . 2> /dev/null`"
|
|---|
| 56 | TIMESTAMP="`date "+%Y-%m-%d %H:%M:%S" 2> /dev/null`"
|
|---|
| 57 | if [ -z "$TAG" ] || [ "$TAG" == "exported" ]; then
|
|---|
| 58 | TAG="Built on $TIMESTAMP for $ARCH"
|
|---|
| 59 | else
|
|---|
| 60 | TAG="Revision $TAG (built on $TIMESTAMP for $ARCH)"
|
|---|
| 61 | fi
|
|---|
| 62 |
|
|---|
| 63 | tools/config.py $ARCH default
|
|---|
| 64 | make all "ARCH=$ARCH" "TAG=$TAG" $ARGS
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.