daily update
[deliverable/binutils-gdb.git] / mpw-build.in
... / ...
CommitLineData
1# Top-level script fragment to build everything for MPW.
2
3Set savedir "`Directory`"
4
5#Set Echo 1
6
7Set ThisScript "{0}"
8
9Set objdir ":"
10
11Set verify 0
12
13Set BuildTarget "none"
14
15# Parse arguments.
16
17Loop
18 Break If {#} == 0
19 If "{BuildTarget}" =~ /none/
20 Set BuildTarget "{1}"
21 Else
22 Echo Only one build target allowed, ignoring "{1}"
23 End If
24 Shift 1
25End Loop
26
27If "{BuildTarget}" =~ /none/
28 Set BuildTarget "all"
29End If
30
31If {verify} == 1
32 Echo "#" Doing "{ThisScript}" "{BuildTarget}" in "`Directory`" ...
33End If
34
35Set ranmake 0
36
37If "`Exists Makefile`" != ""
38 Echo "Set Echo 1" >{BuildTarget}.makeout
39 Make -f Makefile {BuildTarget} >>{BuildTarget}.makeout
40 {BuildTarget}.makeout
41 Delete {BuildTarget}.makeout
42 Set ranmake 1
43End If
44
45If "`Exists Makefile.PPC`" != ""
46 Echo "Set Echo 1" >{BuildTarget}.makeout.ppc
47 Make -f Makefile.PPC {BuildTarget} >>{BuildTarget}.makeout.ppc
48 {BuildTarget}.makeout.ppc
49 Delete {BuildTarget}.makeout.ppc
50 Set ranmake 1
51End If
52
53If {ranmake} == 1
54 Exit
55End If
56
57# Dispatch on various pseudo-targets.
58
59If "{BuildTarget}" =~ /all/
60 Echo Started `Date`
61 "{ThisScript}" all-gcc
62 "{ThisScript}" all-gdb
63 Echo Finished `Date`
64Else If "{BuildTarget}" =~ /all-libiberty/
65 "{ThisScript}" do-libiberty
66Else If "{BuildTarget}" =~ /all-bfd/
67 "{ThisScript}" do-bfd
68Else If "{BuildTarget}" =~ /all-opcodes/
69 "{ThisScript}" do-opcodes
70Else If "{BuildTarget}" =~ /all-byacc/
71 "{ThisScript}" do-byacc
72Else If "{BuildTarget}" =~ /all-flex/
73 "{ThisScript}" all-libiberty
74 "{ThisScript}" do-flex
75Else If "{BuildTarget}" =~ /all-binutils/
76 "{ThisScript}" all-libiberty
77 "{ThisScript}" all-bfd
78 "{ThisScript}" all-opcodes
79 "{ThisScript}" do-binutils
80Else If "{BuildTarget}" =~ /all-gas/
81 "{ThisScript}" all-libiberty
82 "{ThisScript}" all-bfd
83 "{ThisScript}" all-opcodes
84 "{ThisScript}" do-gas
85Else If "{BuildTarget}" =~ /all-gcc/
86 "{ThisScript}" all-libiberty
87 "{ThisScript}" all-gas
88 "{ThisScript}" all-binutils
89 "{ThisScript}" all-ld
90 "{ThisScript}" do-gcc
91Else If "{BuildTarget}" =~ /all-gdb/
92 "{ThisScript}" all-libiberty
93 "{ThisScript}" all-bfd
94 "{ThisScript}" all-opcodes
95 "{ThisScript}" do-gdb
96Else If "{BuildTarget}" =~ /all-grez/
97 "{ThisScript}" all-libiberty
98 "{ThisScript}" all-bfd
99 "{ThisScript}" do-grez
100Else If "{BuildTarget}" =~ /all-ld/
101 "{ThisScript}" all-libiberty
102 "{ThisScript}" all-bfd
103 "{ThisScript}" all-opcodes
104 "{ThisScript}" do-ld
105Else If "{BuildTarget}" =~ /do-byacc/
106 SetDirectory :byacc:
107 ::mpw-build all
108Else If "{BuildTarget}" =~ /do-flex/
109 SetDirectory :flex:
110 ::mpw-build _bootstrap
111 ::mpw-build all
112Else If "{BuildTarget}" =~ /do-bfd/
113 SetDirectory :bfd:
114 ::mpw-build all
115Else If "{BuildTarget}" =~ /do-libiberty/
116 SetDirectory :libiberty:
117 ::mpw-build all
118Else If "{BuildTarget}" =~ /do-opcodes/
119 SetDirectory :opcodes:
120 ::mpw-build all
121Else If "{BuildTarget}" =~ /do-binutils/
122 SetDirectory :binutils:
123 ::mpw-build stamps
124 ::mpw-build all
125Else If "{BuildTarget}" =~ /do-gas/
126 SetDirectory :gas:
127 ::mpw-build stamps
128 ::mpw-build all
129Else If "{BuildTarget}" =~ /do-gcc/
130 SetDirectory :gcc:
131 :mpw-build all
132Else If "{BuildTarget}" =~ /do-gdb/
133 SetDirectory :gdb:
134 ::mpw-build all
135Else If "{BuildTarget}" =~ /do-grez/
136 SetDirectory :grez:
137 ::mpw-build all
138Else If "{BuildTarget}" =~ /do-ld/
139 SetDirectory :ld:
140 ::mpw-build all
141Else If "{BuildTarget}" =~ /do-newlib/
142 SetDirectory :newlib:
143 ::mpw-build all
144Else If "{BuildTarget}" =~ /install/
145 "{ThisScript}" install-only-top
146 "{ThisScript}" install-binutils
147 "{ThisScript}" install-gas
148 "{ThisScript}" install-gcc
149 "{ThisScript}" install-ld
150 "{ThisScript}" install-gdb
151Else If "{BuildTarget}" =~ /install-binutils/
152 SetDirectory :binutils:
153 ::mpw-build install
154Else If "{BuildTarget}" =~ /install-gas/
155 SetDirectory :gas:
156 ::mpw-build install
157Else If "{BuildTarget}" =~ /install-gcc/
158 SetDirectory :gcc:
159 :mpw-build install
160Else If "{BuildTarget}" =~ /install-gdb/
161 SetDirectory :gdb:
162 ::mpw-build install
163Else If "{BuildTarget}" =~ /install-grez/
164 SetDirectory :grez:
165 ::mpw-build install
166Else If "{BuildTarget}" =~ /install-ld/
167 SetDirectory :ld:
168 ::mpw-build install
169Else If "{BuildTarget}" =~ /install-only/
170 "{ThisScript}" install-only-top
171 "{ThisScript}" install-only-binutils
172 "{ThisScript}" install-only-gas
173 "{ThisScript}" install-only-gcc
174 "{ThisScript}" install-only-gdb
175 "{ThisScript}" install-only-ld
176Else If "{BuildTarget}" =~ /install-only-binutils/
177 SetDirectory :binutils:
178 ::mpw-build install-only
179Else If "{BuildTarget}" =~ /install-only-gas/
180 SetDirectory :gas:
181 ::mpw-build install-only
182Else If "{BuildTarget}" =~ /install-only-gcc/
183 SetDirectory :gcc:
184 :mpw-build install-only
185Else If "{BuildTarget}" =~ /install-only-gdb/
186 SetDirectory :gdb:
187 ::mpw-build install-only
188Else If "{BuildTarget}" =~ /install-only-grez/
189 SetDirectory :grez:
190 ::mpw-build install-only
191Else If "{BuildTarget}" =~ /install-only-ld/
192 SetDirectory :ld:
193 ::mpw-build install-only
194Else If "{BuildTarget}" =~ /install-only-top/
195 NewFolderRecursive "{prefix}"
196 If "{prefix}" != "`Directory`"
197 Duplicate -y 'Read Me for MPW' "{prefix}"'Read Me for MPW'
198 Duplicate -y Install "{prefix}"Install
199 End If
200Else
201 Echo {BuildTarget} not understood, ignoring
202End If
203
204SetDirectory "{savedir}"
This page took 0.02346 seconds and 4 git commands to generate.