Commit | Line | Data |
---|---|---|
5db7ecb7 SS |
1 | # Top-level script fragment to build everything for MPW. |
2 | ||
3 | Set savedir "`Directory`" | |
4 | ||
5 | #Set Echo 1 | |
6 | ||
aa8f28af | 7 | Set ThisScript "{0}" |
5db7ecb7 SS |
8 | |
9 | Set objdir ":" | |
10 | ||
11 | Set verify 0 | |
5db7ecb7 SS |
12 | |
13 | Set BuildTarget "none" | |
14 | ||
5db7ecb7 SS |
15 | # Parse arguments. |
16 | ||
17 | Loop | |
18 | Break If {#} == 0 | |
5db7ecb7 SS |
19 | If "{BuildTarget}" =~ /none/ |
20 | Set BuildTarget "{1}" | |
21 | Else | |
22 | Echo Only one build target allowed, ignoring "{1}" | |
23 | End If | |
5db7ecb7 SS |
24 | Shift 1 |
25 | End Loop | |
26 | ||
aa8f28af SS |
27 | If {verify} == 1 |
28 | Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ... | |
29 | End If | |
30 | ||
31 | If "`Exists Makefile`" != "" | |
32 | Echo "Set Echo 1" >{BuildTarget}.makeout | |
33 | Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout | |
34 | {BuildTarget}.makeout | |
35 | Delete {BuildTarget}.makeout | |
36 | Else If "{BuildTarget}" =~ /all/ | |
37 | "{ThisScript}" all-gcc | |
38 | "{ThisScript}" all-ld | |
39 | "{ThisScript}" all-gdb | |
5db7ecb7 | 40 | Else If "{BuildTarget}" =~ /all-binutils/ |
aa8f28af SS |
41 | "{ThisScript}" do-libiberty |
42 | "{ThisScript}" do-bfd | |
43 | "{ThisScript}" do-opcodes | |
44 | "{ThisScript}" do-binutils | |
5db7ecb7 | 45 | Else If "{BuildTarget}" =~ /all-gas/ |
aa8f28af SS |
46 | "{ThisScript}" do-libiberty |
47 | "{ThisScript}" do-bfd | |
48 | "{ThisScript}" do-opcodes | |
49 | "{ThisScript}" do-gas | |
5db7ecb7 | 50 | Else If "{BuildTarget}" =~ /all-gcc/ |
aa8f28af SS |
51 | "{ThisScript}" all-gas |
52 | "{ThisScript}" all-binutils | |
53 | "{ThisScript}" do-gcc | |
5db7ecb7 | 54 | Else If "{BuildTarget}" =~ /all-gdb/ |
aa8f28af SS |
55 | "{ThisScript}" do-libiberty |
56 | "{ThisScript}" do-bfd | |
57 | "{ThisScript}" do-opcodes | |
58 | "{ThisScript}" do-gdb | |
5db7ecb7 | 59 | Else If "{BuildTarget}" =~ /all-ld/ |
aa8f28af SS |
60 | "{ThisScript}" do-libiberty |
61 | "{ThisScript}" do-bfd | |
62 | "{ThisScript}" do-opcodes | |
63 | "{ThisScript}" do-ld | |
5db7ecb7 SS |
64 | Else If "{BuildTarget}" =~ /do-bfd/ |
65 | SetDirectory :bfd: | |
aa8f28af | 66 | ::mpw-build all |
5db7ecb7 SS |
67 | Else If "{BuildTarget}" =~ /do-libiberty/ |
68 | SetDirectory :libiberty: | |
aa8f28af | 69 | ::mpw-build all |
5db7ecb7 SS |
70 | Else If "{BuildTarget}" =~ /do-opcodes/ |
71 | SetDirectory :opcodes: | |
aa8f28af | 72 | ::mpw-build all |
5db7ecb7 SS |
73 | Else If "{BuildTarget}" =~ /do-binutils/ |
74 | SetDirectory :binutils: | |
aa8f28af | 75 | ::mpw-build all |
5db7ecb7 SS |
76 | Else If "{BuildTarget}" =~ /do-gas/ |
77 | SetDirectory :gas: | |
aa8f28af | 78 | ::mpw-build all |
5db7ecb7 SS |
79 | Else If "{BuildTarget}" =~ /do-gcc/ |
80 | SetDirectory :gcc: | |
aa8f28af | 81 | ::mpw-build all |
5db7ecb7 SS |
82 | Else If "{BuildTarget}" =~ /do-gdb/ |
83 | SetDirectory :gdb: | |
aa8f28af | 84 | ::mpw-build all |
5db7ecb7 SS |
85 | Else If "{BuildTarget}" =~ /do-ld/ |
86 | SetDirectory :ld: | |
aa8f28af | 87 | ::mpw-build all |
5db7ecb7 | 88 | Else If "{BuildTarget}" =~ /install/ |
aa8f28af SS |
89 | "{ThisScript}" install-binutils |
90 | "{ThisScript}" install-gas | |
91 | "{ThisScript}" install-gcc | |
92 | # "{ThisScript}" install-gdb | |
93 | "{ThisScript}" install-ld | |
5db7ecb7 SS |
94 | Else If "{BuildTarget}" =~ /install-binutils/ |
95 | SetDirectory :binutils: | |
aa8f28af | 96 | ::mpw-build install |
5db7ecb7 SS |
97 | Else If "{BuildTarget}" =~ /install-gas/ |
98 | SetDirectory :gas: | |
aa8f28af | 99 | ::mpw-build install |
5db7ecb7 SS |
100 | Else If "{BuildTarget}" =~ /install-gcc/ |
101 | SetDirectory :gcc: | |
aa8f28af | 102 | ::mpw-build install |
5db7ecb7 SS |
103 | Else If "{BuildTarget}" =~ /install-gdb/ |
104 | SetDirectory :gdb: | |
aa8f28af | 105 | ::mpw-build install |
5db7ecb7 SS |
106 | Else If "{BuildTarget}" =~ /install-ld/ |
107 | SetDirectory :ld: | |
aa8f28af | 108 | ::mpw-build install |
5db7ecb7 SS |
109 | Else |
110 | End If | |
111 | ||
112 | SetDirectory "{savedir}" |