diff options
author | Chris Johns <chrisj@rtems.org> | 2006-07-22 07:23:51 +0000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2006-07-22 07:23:51 +0000 |
commit | 332fd2a2d9a1840ceea247b1f96c9443c402034f (patch) | |
tree | 7937babb53b38125dbd024480e16b54ce5a2ca2d /contrib/mingw/build.sh | |
parent | e302e959f3b8a998bdbb70122f0f14f0035ca0d9 (diff) |
Changes to the installer and an extra script to build all.
Diffstat (limited to 'contrib/mingw/build.sh')
-rwxr-xr-x | contrib/mingw/build.sh | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/contrib/mingw/build.sh b/contrib/mingw/build.sh new file mode 100755 index 0000000000..61b3dc3003 --- /dev/null +++ b/contrib/mingw/build.sh @@ -0,0 +1,90 @@ +# +# $Id$ +# +# RTEMS Build script. +# +# This script builds the RPM files then the Windows executables. +# +# Note: This file should be placed in crossrpms. +# + +terminate() +{ + echo "error: $*" >&2 + exit 1 +} + +check() +{ + if [ $? -ne 0 ]; then + terminate + fi +} + +debug= +hosts= +prefix= +no_run= +relocate= +source= +targets= +version= +log=build.txt + +while [ $# -gt 0 ]; +do + case $1 in + -d) + set -x + debug="-d" + ;; + -h) + shift + hosts="-h $1" + ;; + -l) + shift + log=$1 + ;; + -n) + no_run="-n" + ;; + -p) + shift + prefix="-p $1" + ;; + -r) + shift + relocation="-r $1" + ;; + -s) + shift + source="-s $1" + ;; + -t) + shift + targets="-t $1" + ;; + -v) + shift + version="-v $1" + ;; + --help) + echo "$0 -dn -h <hosts> -p <prefix> -s <source> -t <targets> -v <version>" + exit 2 + ;; + *) + terminate "error: invalid option (try --help): $1" + ;; + esac + shift +done + +scripts=$(dirname $0) + +$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version 2>&1 | tee $log +check "Making the RPM files." + +$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation 2>&1 | tee -a $log +check "Making the executable files." + |