Sanitize out Nortel 750 sprs
[deliverable/binutils-gdb.git] / opcodes / .Sanitize
1 # .Sanitize for devo/opcodes.
2
3 # Each directory to survive its way into a release will need a file
4 # like this one called "./.Sanitize". All keyword lines must exist,
5 # and must exist in the order specified by this file. Each directory
6 # in the tree will be processed, top down, in the following order.
7
8 # Hash started lines like this one are comments and will be deleted
9 # before anything else is done. Blank lines will also be squashed
10 # out.
11
12 # The lines between the "Do-first:" line and the "Things-to-keep:"
13 # line are executed as a /bin/sh shell script before anything else is
14 # done in this directory.
15
16 Do-first:
17
18 cygnus_files="cgen.sh cgen-asm.in cgen-dis.in cgen-opc.in"
19
20 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
21 keep_these_too="${cygnus_files} ${keep_these_too}"
22 else
23 lose_these_too="${cygnus_files} ${lose_these_too}"
24 fi
25
26 tic80_files="tic80-opc.c tic80-dis.c"
27
28 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
29 keep_these_too="${tic80_files} ${keep_these_too}"
30 else
31 lose_these_too="${tic80_files} ${lose_these_too}"
32 fi
33
34 sky_files="dvp-opc.c dvp-dis.c"
35
36 if ( echo $* | grep keep\-sky > /dev/null ) ; then
37 keep_these_too="${sky_files} ${keep_these_too}"
38 else
39 lose_these_too="${sky_files} ${lose_these_too}"
40 fi
41
42 # All files listed between the "Things-to-keep:" line and the
43 # "Files-to-sed:" line will be kept. All other files will be removed.
44 # Directories listed in this section will have their own Sanitize
45 # called. Directories not listed will be removed in their entirety
46 # with rm -rf.
47
48 Things-to-keep:
49
50 ChangeLog
51 Makefile.am
52 Makefile.in
53 acconfig.h
54 acinclude.m4
55 aclocal.m4
56 alpha-dis.c
57 alpha-opc.c
58 arc-dis.c
59 arc-opc.c
60 arm-dis.c
61 arm-opc.h
62 a29k-dis.c
63 cgen-asm.c
64 cgen-dis.c
65 cgen-opc.c
66 config.in
67 configure
68 configure.bat
69 configure.in
70 d10v-dis.c
71 d10v-opc.c
72 d30v-dis.c
73 d30v-opc.c
74 dep-in.sed
75 dis-buf.c
76 disassemble.c
77 h8300-dis.c
78 h8500-dis.c
79 h8500-opc.h
80 hppa-dis.c
81 i386-dis.c
82 i960-dis.c
83 m32r-asm.c
84 m32r-dis.c
85 m32r-opc.c
86 m32r-opc.h
87 m68k-dis.c
88 m68k-opc.c
89 m88k-dis.c
90 makefile.vms
91 mips-dis.c
92 mips-opc.c
93 mips16-opc.c
94 m10200-dis.c
95 m10200-opc.c
96 m10300-dis.c
97 m10300-opc.c
98 mpw-config.in
99 mpw-make.sed
100 ns32k-dis.c
101 opintl.h
102 po
103 ppc-dis.c
104 ppc-opc.c
105 sh-opc.h
106 sh-dis.c
107 sparc-dis.c
108 sparc-opc.c
109 stamp-h.in
110 sysdep.h
111 tic30-dis.c
112 vax-dis.c
113 w65-dis.c
114 w65-opc.h
115 v850-opc.c
116 v850-dis.c
117 z8k-dis.c
118 z8k-opc.h
119 z8kgen.c
120
121 Things-to-lose:
122
123 Do-last:
124
125 cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
126 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
127 for i in $cygnus_files ; do
128 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
129 if [ -n "${verbose}" ] ; then
130 echo Keeping cygnus stuff in $i
131 fi
132 fi
133 done
134 else
135 for i in $cygnus_files ; do
136 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
137 if [ -n "${verbose}" ] ; then
138 echo Removing traces of \"cygnus\" from $i...
139 fi
140 cp $i new
141 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
142 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
143 if [ -n "${verbose}" ] ; then
144 echo Caching $i in .Recover...
145 fi
146 mv $i .Recover
147 fi
148 mv new $i
149 fi
150 done
151 fi
152
153 am33_files="ChangeLog m10300-opc.c m10300-dis.c"
154 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
155 for i in $am33_files ; do
156 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
157 if [ -n "${verbose}" ] ; then
158 echo Keeping am33 stuff in $i
159 fi
160 fi
161 done
162 else
163 for i in $am33_files ; do
164 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
165 if [ -n "${verbose}" ] ; then
166 echo Removing traces of \"am33\" from $i...
167 fi
168 cp $i new
169 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
170 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
171 if [ -n "${verbose}" ] ; then
172 echo Caching $i in .Recover...
173 fi
174 mv $i .Recover
175 fi
176 mv new $i
177 fi
178 done
179 fi
180
181
182 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
183 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
184 for i in $v850e_files ; do
185 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
186 if [ -n "${verbose}" ] ; then
187 echo Keeping v850e stuff in $i
188 fi
189 fi
190 done
191 else
192 for i in $v850e_files ; do
193 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
194 if [ -n "${verbose}" ] ; then
195 echo Removing traces of \"v850e\" from $i...
196 fi
197 cp $i new
198 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
199 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
200 if [ -n "${verbose}" ] ; then
201 echo Caching $i in .Recover...
202 fi
203 mv $i .Recover
204 fi
205 mv new $i
206 fi
207 done
208 fi
209
210
211 r5900_files="ChangeLog mips-opc.c mips-dis.c Makefile.am Makefile.in"
212 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
213 for i in $r5900_files ; do
214 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
215 if [ -n "${verbose}" ] ; then
216 echo Keeping r5900 stuff in $i
217 fi
218 fi
219 done
220 else
221 for i in $r5900_files ; do
222 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
223 if [ -n "${verbose}" ] ; then
224 echo Removing traces of \"r5900\" from $i...
225 fi
226 cp $i new
227 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
228 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
229 if [ -n "${verbose}" ] ; then
230 echo Caching $i in .Recover...
231 fi
232 mv $i .Recover
233 fi
234 mv new $i
235 fi
236 done
237 fi
238
239 vr4320_files="ChangeLog mips-opc.c mips-dis.c"
240 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
241 for i in $vr4320_files ; do
242 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
243 if [ -n "${verbose}" ] ; then
244 echo Keeping vr4320 stuff in $i
245 fi
246 fi
247 done
248 else
249 for i in $vr4320_files ; do
250 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
251 if [ -n "${verbose}" ] ; then
252 echo Removing traces of \"vr4320\" from $i...
253 fi
254 cp $i new
255 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
256 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
257 if [ -n "${verbose}" ] ; then
258 echo Caching $i in .Recover...
259 fi
260 mv $i .Recover
261 fi
262 mv new $i
263 fi
264 done
265 fi
266
267 cygnus_files="ChangeLog mips-opc.c mips-dis.c"
268 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
269 for i in $cygnus_files ; do
270 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
271 if [ -n "${verbose}" ] ; then
272 echo Keeping cygnus stuff in $i
273 fi
274 fi
275 done
276 else
277 for i in $cygnus_files ; do
278 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
279 if [ -n "${verbose}" ] ; then
280 echo Removing traces of \"cygnus\" from $i...
281 fi
282 cp $i new
283 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
284 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
285 if [ -n "${verbose}" ] ; then
286 echo Caching $i in .Recover...
287 fi
288 mv $i .Recover
289 fi
290 mv new $i
291 fi
292 done
293 fi
294
295 tx19_files="ChangeLog mips16-opc.c mips-dis.c"
296 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
297 for i in $tx19_files ; do
298 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
299 if [ -n "${verbose}" ] ; then
300 echo Keeping tx19 stuff in $i
301 fi
302 fi
303 done
304 else
305 for i in $tx19_files ; do
306 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
307 if [ -n "${verbose}" ] ; then
308 echo Removing traces of \"tx19\" from $i...
309 fi
310 cp $i new
311 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
312 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
313 if [ -n "${verbose}" ] ; then
314 echo Caching $i in .Recover...
315 fi
316 mv $i .Recover
317 fi
318 mv new $i
319 fi
320 done
321 fi
322
323 tx49_files="ChangeLog mips-opc.c mips-dis.c"
324 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
325 for i in $tx49_files ; do
326 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
327 if [ -n "${verbose}" ] ; then
328 echo Keeping tx49 stuff in $i
329 fi
330 fi
331 done
332 else
333 for i in $tx49_files ; do
334 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
335 if [ -n "${verbose}" ] ; then
336 echo Removing traces of \"tx49\" from $i...
337 fi
338 cp $i new
339 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
340 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
341 if [ -n "${verbose}" ] ; then
342 echo Caching $i in .Recover...
343 fi
344 mv $i .Recover
345 fi
346 mv new $i
347 fi
348 done
349 fi
350
351 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
352 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
353 for i in $tic80_files ; do
354 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
355 if [ -n "${verbose}" ] ; then
356 echo Keeping tic80 stuff in $i
357 fi
358 fi
359 done
360 else
361 for i in $tic80_files ; do
362 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
363 if [ -n "${verbose}" ] ; then
364 echo Removing traces of \"tic80\" from $i...
365 fi
366 cp $i new
367 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
368 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
369 if [ -n "${verbose}" ] ; then
370 echo Caching $i in .Recover...
371 fi
372 mv $i .Recover
373 fi
374 mv new $i
375 fi
376 done
377 fi
378
379 coldfire_files="ChangeLog m68k-opc.c"
380 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
381 for i in $coldfire_files ; do
382 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
383 if [ -n "${verbose}" ] ; then
384 echo Keeping coldfire stuff in $i
385 fi
386 fi
387 done
388 else
389 for i in $coldfire_files ; do
390 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
391 if [ -n "${verbose}" ] ; then
392 echo Removing traces of \"coldfire\" from $i...
393 fi
394 cp $i new
395 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
396 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
397 if [ -n "${verbose}" ] ; then
398 echo Caching $i in .Recover...
399 fi
400 mv $i .Recover
401 fi
402 mv new $i
403 fi
404 done
405 fi
406
407 sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
408 if ( echo $* | grep keep\-sky > /dev/null ) ; then
409 for i in $sky_files ; do
410 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
411 if [ -n "${verbose}" ] ; then
412 echo Keeping sky stuff in $i
413 fi
414 fi
415 done
416 else
417 for i in $sky_files ; do
418 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
419 if [ -n "${verbose}" ] ; then
420 echo Removing traces of \"sky\" from $i...
421 fi
422 cp $i new
423 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
424 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
425 if [ -n "${verbose}" ] ; then
426 echo Caching $i in .Recover...
427 fi
428 mv $i .Recover
429 fi
430 mv new $i
431 fi
432 done
433 fi
434
435 m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
436 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
437 for i in $m32rx_files ; do
438 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
439 if [ -n "${verbose}" ] ; then
440 echo Keeping m32rx stuff in $i
441 fi
442 fi
443 done
444 else
445 for i in $m32rx_files ; do
446 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
447 if [ -n "${verbose}" ] ; then
448 echo Removing traces of \"m32rx\" from $i...
449 fi
450 cp $i new
451 # The PIPE sanitization will be much cleaner with redact.
452 sed -e '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' \
453 -e 's/, PIPE_[A-Z]*//g' < $i > new
454 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
455 if [ -n "${verbose}" ] ; then
456 echo Caching $i in .Recover...
457 fi
458 mv $i .Recover
459 fi
460 mv new $i
461 fi
462 done
463 fi
464
465 nortel_ppc750_files="ChangeLog ppc-opc.c"
466 if ( echo $* | grep keep\-nortel-ppc750 > /dev/null ) ; then
467 for i in $nortel_ppc750_files ; do
468 if test -f $i && (grep sanitize-nortel-ppc750 $i > /dev/null) ; then
469 if [ -n "${verbose}" ] ; then
470 echo Keeping m32rx stuff in $i
471 fi
472 fi
473 done
474 else
475 for i in $nortel_ppc750_files ; do
476 if test -f $i && (grep sanitize-nortel-ppc750 $i > /dev/null) ; then
477 if [ -n "${verbose}" ] ; then
478 echo Removing traces of \"m32rx\" from $i...
479 fi
480 cp $i new
481 # The PIPE sanitization will be much cleaner with redact.
482 sed -e '/start\-sanitize\-nortel-ppc750/,/end\-sanitize\-nortel-ppc750/d' \
483 -e 's/, PIPE_[A-Z]*//g' < $i > new
484 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
485 if [ -n "${verbose}" ] ; then
486 echo Caching $i in .Recover...
487 fi
488 mv $i .Recover
489 fi
490 mv new $i
491 fi
492 done
493 fi
494
495 for i in *; do
496 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
497 echo '***' Some mentions of Sanitize are still left in opcodes/$i! 1>&2
498 fi
499 done
500
501 for lost in .. $lose_these_too; do
502 if test $lost != ..; then
503 for i in Makefile.am Makefile.in configure.in configure; do
504 if fgrep $lost $i >/dev/null 2>&1; then
505 echo '***' File $lost was sanitized out but is still mentioned in opcodes/$i 1>&2
506 fi
507 done
508 fi
509 done
510
511 # This must come after all other sanitizations. Re-sanitize the .pot
512 # file.
513 if [ -n "${verbose}" ]; then
514 echo Re-computing files for gettext ...
515 fi
516
517 if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
518 if [ -n "${verbose}" ]; then
519 echo Caching po/POTFILES.in in .Recover...
520 fi
521 mv po/POTFILES.in po/.Recover
522 fi
523
524 ls -1 *.[ch] cg*.in 2>/dev/null | sed -e 's,^\./,,' > po/POTFILES.in
525
526 if [ -n "${safe}" -a ! -f po/.Recover/opcodes.pot ]; then
527 if [ -n "${verbose}" ]; then
528 echo Caching po/opcodes.pot in .Recover...
529 fi
530 mv po/opcodes.pot po/.Recover
531 fi
532
533 # If this fails, Sanitization must fail.
534 xgettext -C -c -k_ -kN_ -f po/POTFILES.in -o po/opcodes.pot || exit 1
535
536 # End of file.
This page took 0.047704 seconds and 5 git commands to generate.