source:
rtems/contrib/mingw/build.sh
@
0e6d50c
Last change on this file since 0e6d50c was b7c9b29, checked in by Chris Johns <chrisj@…>, on 08/07/06 at 07:03:13 | |
---|---|
|
|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
[808db8e] | 1 | #! /bin/sh |
[332fd2a] | 2 | # |
3 | # $Id$ | |
4 | # | |
5 | # RTEMS Build script. | |
6 | # | |
7 | # This script builds the RPM files then the Windows executables. | |
8 | # | |
9 | # Note: This file should be placed in crossrpms. | |
10 | # | |
11 | ||
[808db8e] | 12 | command_line="$0 $*" |
13 | ||
[332fd2a] | 14 | terminate() |
15 | { | |
16 | echo "error: $*" >&2 | |
17 | exit 1 | |
[808db8e] | 18 | echo "after" |
[332fd2a] | 19 | } |
20 | ||
21 | check() | |
22 | { | |
23 | if [ $? -ne 0 ]; then | |
[808db8e] | 24 | terminate $* |
[332fd2a] | 25 | fi |
26 | } | |
27 | ||
28 | debug= | |
29 | hosts= | |
30 | prefix= | |
31 | no_run= | |
32 | relocate= | |
33 | source= | |
34 | targets= | |
35 | version= | |
36 | log=build.txt | |
37 | ||
38 | while [ $# -gt 0 ]; | |
39 | do | |
40 | case $1 in | |
41 | -d) | |
42 | set -x | |
43 | debug="-d" | |
44 | ;; | |
45 | -h) | |
46 | shift | |
47 | hosts="-h $1" | |
48 | ;; | |
49 | -l) | |
50 | shift | |
51 | log=$1 | |
52 | ;; | |
53 | -n) | |
54 | no_run="-n" | |
55 | ;; | |
56 | -p) | |
57 | shift | |
58 | prefix="-p $1" | |
59 | ;; | |
60 | -r) | |
61 | shift | |
62 | relocation="-r $1" | |
63 | ;; | |
64 | -s) | |
65 | shift | |
66 | source="-s $1" | |
67 | ;; | |
68 | -t) | |
69 | shift | |
70 | targets="-t $1" | |
71 | ;; | |
72 | -v) | |
73 | shift | |
74 | version="-v $1" | |
75 | ;; | |
76 | --help) | |
77 | echo "$0 -dn -h <hosts> -p <prefix> -s <source> -t <targets> -v <version>" | |
78 | exit 2 | |
79 | ;; | |
80 | *) | |
81 | terminate "error: invalid option (try --help): $1" | |
82 | ;; | |
83 | esac | |
84 | shift | |
85 | done | |
86 | ||
[808db8e] | 87 | echo "$command_line" > $log |
88 | ||
[332fd2a] | 89 | scripts=$(dirname $0) |
90 | ||
[b7c9b29] | 91 | echo "$scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version" >> $log |
[808db8e] | 92 | $scripts/build-rpms.sh -i $debug $no_run $prefix $source $targets $hosts $version 2>&1 | tee -a $log |
93 | if [ ${PIPESTATUS[0]} -ne 0 ]; then | |
94 | terminate "Making the RPM files." | |
95 | fi | |
[332fd2a] | 96 | |
[b7c9b29] | 97 | echo "$scripts/build-exes.sh $debug $no_run $prefix $targets $relocation" >> $log |
[332fd2a] | 98 | $scripts/build-exes.sh $debug $no_run $prefix $targets $relocation 2>&1 | tee -a $log |
[808db8e] | 99 | if [ ${PIPESTATUS[0]} -ne 0 ]; then |
100 | terminate "Making the executable files." | |
101 | fi | |
[332fd2a] | 102 | |
[808db8e] | 103 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.