comparison src/gpf2/ccd/mall.bat @ 1:864b8cc0cf63

src/gpf2: preened GPF goo from TCS211
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 25 Sep 2016 23:38:58 +0000
parents
children
comparison
equal deleted inserted replaced
0:945cf7f506b2 1:864b8cc0cf63
1 @echo off
2 rem build all CCD variants
3 setlocal
4
5 set name=CCD
6 set name_small=ccd
7 set err_file=..\%name_small%.err
8
9 @if x%_4ver% == x goto need4nt
10 @if x%1 == x-help goto help
11 @if x%1 == x-guitest goto guitest
12 @if x%1 == x-test goto test
13
14 REM default is gnumake:
15 set M=gnumake -r
16 REM use clearmake if under ClearCase
17 set IN_VOB=FALSE
18 REM is clearcase installed ?
19 if "%CLEARCASE_PRIMARY_GROUP%" == "" goto options
20 REM are we using a clearcase view ?
21 cleartool lsview -cview >nul 2>>&1
22 if errorlevel 1 goto options
23 REM on a clearcase view: use clearmake in gnu mode:
24 set M=clearmake -V -C gnu
25 set IN_VOB=TRUE
26
27 :options
28 REM set default options
29 set clean=0
30 set def_ver=DEV_BUILD
31 set ver=0
32 set maketarget=colibs all
33 REM parse command line options
34 :parse_opt
35 iff "%1" == "-gmake" then
36 set M=gnumake -r
37 elseiff "%1" == "-clean" then
38 iff "%maketarget%" == "colibs all cilibs" then
39 echo mall: option -clean ignored when -exp is given
40 else
41 set maketarget=clean
42 endiff
43 elseiff "%1" == "-l" then
44 iff "%2" == "" then
45 echo error: no label name specified !
46 goto help
47 endiff
48 set ver=%2
49 shift
50 elseiff "%1" == "-exp" then
51 iff %maketarget% == clean then
52 echo mall: option -exp ignored when -clean is given
53 else
54 set maketarget=colibs all cilibs
55 endiff
56 elseiff "%1" == "-n" then
57 set M=echo
58 shift
59 elseiff "%1" != "" then
60 goto help
61 endiff
62 shift
63 if "%1" != "" goto parse_opt
64
65 if exist %err_file% del %err_file% >nul
66
67 if %ver% != 0 echo "using label %ver% (not implemented yet) ..."
68
69 iff %maketarget% == clean then
70 echo *** cleaning CCD libs *** | tee /a %err_file%
71 else
72 echo *** making CCD libs *** | tee /a %err_file%
73 endiff
74
75 rem nuc Libraries
76 :arm7
77 echo ********** nuc arm7 ********** | tee /a %err_file%
78 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
79 %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
80 if %? != 0 goto err
81
82 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
83 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
84 if %? != 0 goto err
85
86 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file%
87 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
88 if %? != 0 goto err
89
90 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file%
91 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file% 2>>&1
92 if %? != 0 goto err
93
94 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 %maketarget% >>%err_file%
95 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 %maketarget% >>%err_file% 2>>&1
96 if %? != 0 goto err
97 rem ********** nuc arm7: splitted libraries ir/fl
98 rem RUN_FLASH=1 RUN_INT_RAM=0
99 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
100 %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
101 if %? != 0 goto err
102
103 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
104 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
105 if %? != 0 goto err
106
107 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
108 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
109 if %? != 0 goto err
110
111 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
112 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
113 if %? != 0 goto err
114
115 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file%
116 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=1 RUN_INT_RAM=0 %maketarget% >>%err_file% 2>>&1
117 if %? != 0 goto err
118
119 rem RUN_FLASH=0 RUN_INT_RAM=1
120 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
121 %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
122 if %? != 0 goto err
123
124 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
125 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
126 if %? != 0 goto err
127
128 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
129 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
130 if %? != 0 goto err
131
132 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
133 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
134 if %? != 0 goto err
135
136 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file%
137 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 RUN_FLASH=0 RUN_INT_RAM=1 %maketarget% >>%err_file% 2>>&1
138 if %? != 0 goto err
139
140 echo ********** nuc arm7 ts3 ********** | tee /a %err_file%
141 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
142 %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
143 if %? != 0 goto err
144
145 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
146 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
147 if %? != 0 goto err
148
149 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
150 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
151 if %? != 0 goto err
152
153 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file%
154 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
155 if %? != 0 goto err
156
157 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file%
158 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
159 if %? != 0 goto err
160
161 rem ********** nuc arm7 ts3 + DYNARR=1
162 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
163 %M% TARGET=nuc PLATFORM=arm7 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
164 if %? != 0 goto err
165
166 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
167 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
168 if %? != 0 goto err
169
170 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
171 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=0 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
172 if %? != 0 goto err
173
174 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
175 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
176 if %? != 0 goto err
177
178 echo %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file%
179 %M% TARGET=nuc PLATFORM=arm7 DEBUG=1 TRACE=0 MEMSUPER=1 TOOL_CHOICE=3 DYNARR=1 %maketarget% >>%err_file% 2>>&1
180 if %? != 0 goto err
181
182 echo ********** nuc arm9 ts3 ********** | tee /a %err_file%
183 echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
184 %M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
185 if %? != 0 goto err
186
187 echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file%
188 %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
189 if %? != 0 goto err
190
191 echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file%
192 %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=3 %maketarget% >>%err_file% 2>>&1
193 if %? != 0 goto err
194
195 echo ********** nuc arm9 ts6 ********** | tee /a %err_file%
196 echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file%
197 %M% TARGET=nuc PLATFORM=arm9 DEBUG=0 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file% 2>>&1
198 if %? != 0 goto err
199
200 echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file%
201 %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=0 MEMSUPER=0 TOOL_CHOICE=6 %maketarget% >>%err_file% 2>>&1
202 if %? != 0 goto err
203
204 echo %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=6 %maketarget% >>%err_file%
205 %M% TARGET=nuc PLATFORM=arm9 DEBUG=1 TRACE=1 MEMSUPER=1 TOOL_CHOICE=6 %maketarget% >>%err_file% 2>>&1
206 if %? != 0 goto err
207
208 echo ********** nuc pc ********** | tee /a %err_file%
209 echo %M% TARGET=nuc PLATFORM=pc DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
210 %M% TARGET=nuc PLATFORM=pc DEBUG=0 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
211 if %? != 0 goto err
212
213 echo %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file%
214 %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=0 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
215 if %? != 0 goto err
216
217 echo %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file%
218 %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=0 %maketarget% >>%err_file% 2>>&1
219 if %? != 0 goto err
220
221 echo %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file%
222 %M% TARGET=nuc PLATFORM=pc DEBUG=1 TRACE=1 MEMSUPER=1 %maketarget% >>%err_file% 2>>&1
223 if %? != 0 goto err
224
225 rem win32 Libraries
226 echo ********** win32 ********** | tee /a %err_file%
227 echo %M% TARGET=win32 DEBUG=0 TRACE=0 %maketarget% >>%err_file%
228 %M% TARGET=win32 DEBUG=0 TRACE=0 %maketarget% >>%err_file% 2>>&1
229 if %? != 0 goto err
230
231 echo %M% TARGET=win32 DEBUG=1 TRACE=1 %maketarget% >>%err_file%
232 %M% TARGET=win32 DEBUG=1 TRACE=1 %maketarget% >>%err_file% 2>>&1
233 if %? != 0 goto err
234
235 goto final
236
237 :help
238 text
239 usage:
240 mall {-help |
241 { [-l <LABEL>] | -clean | -exp | -gmake }
242 }
243 example: mall -l CCD_1.7.1
244 -clean: clean objects
245 -exp : export, i.e. checkin the built items
246 -gmake: use gnumake anyhow
247 endtext
248 goto end
249
250 :guitest
251 text
252 Tool without GUI - in consequence no GUI test implemented
253 endtext
254 goto end
255
256 :test
257 text
258 Test CCD functionality with GPF teststack:
259 - Change to /gpf/util/teststack:
260 - Call </gpf/util/teststack/mall.bat> to build teststack
261 - Call </gpf/util/teststack/mall.bat -test> to build and execute testsuite
262 endtext
263 goto end
264
265 :need4nt
266 @echo Error: 4DOS or 4NT is needed
267 goto end
268
269 :err
270 grep "error " %err_file%
271 @echo Errors occured ! See %err_file% for details.
272 endlocal
273 quit 1
274
275 :final
276 grep "warning " %err_file% 2> nul
277
278 :end
279 endlocal
280 quit 0