]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - opcodes/.Sanitize
sanitization fix.
[thirdparty/binutils-gdb.git] / opcodes / .Sanitize
CommitLineData
67c2d8c8 1# .Sanitize for devo/opcodes.
a4ccc310 2
e7c4e61c 3# Each directory to survive its way into a release will need a file
a4ccc310
SC
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
10f1b597 14# done in this directory.
a4ccc310
SC
15
16Do-first:
17
ab0bd049 18cygnus_files="cgen.sh cgen-asm.in cgen-dis.in cgen-opc.in"
bfc10abe
DE
19
20if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
21 keep_these_too="${cygnus_files} ${keep_these_too}"
22else
23 lose_these_too="${cygnus_files} ${lose_these_too}"
24fi
25
71e6edea
DE
26fr30_files="fr30-opc.h fr30-opc.c fr30-asm.c fr30-dis.c"
27
28if ( echo $* | grep keep\-fr30 > /dev/null ) ; then
29 keep_these_too="${fr30_files} ${keep_these_too}"
30else
31 lose_these_too="${fr30_files} ${lose_these_too}"
32fi
33
6357e7f6
FF
34tic80_files="tic80-opc.c tic80-dis.c"
35
36if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
37 keep_these_too="${tic80_files} ${keep_these_too}"
38else
39 lose_these_too="${tic80_files} ${lose_these_too}"
40fi
41
37130f11 42sky_files="dvp-opc.c dvp-dis.c"
54cc8ed4
DE
43
44if ( echo $* | grep keep\-sky > /dev/null ) ; then
45 keep_these_too="${sky_files} ${keep_these_too}"
46else
47 lose_these_too="${sky_files} ${lose_these_too}"
48fi
49
a4ccc310
SC
50# All files listed between the "Things-to-keep:" line and the
51# "Files-to-sed:" line will be kept. All other files will be removed.
52# Directories listed in this section will have their own Sanitize
53# called. Directories not listed will be removed in their entirety
54# with rm -rf.
55
56Things-to-keep:
87756e15 57
a4ccc310 58ChangeLog
1daed53f 59Makefile.am
add1fb05 60Makefile.in
1daed53f
ILT
61acconfig.h
62acinclude.m4
9b65d522 63aclocal.m4
5f8f6d56 64alpha-dis.c
96926bf0 65alpha-opc.c
2b0c643b
DE
66arc-dis.c
67arc-opc.c
ba08215a
KR
68arm-dis.c
69arm-opc.h
720b3aed 70a29k-dis.c
35855192
DE
71cgen-asm.c
72cgen-dis.c
73cgen-opc.c
50982f7f
KR
74config.in
75configure
fc984fdb 76configure.bat
add1fb05 77configure.in
a3c5b9a4
JW
78d10v-dis.c
79d10v-opc.c
faec70d6
ILT
80d30v-dis.c
81d30v-opc.c
f76db60b 82dep-in.sed
117733ad 83dis-buf.c
204c9148 84disassemble.c
3b4cc5ec 85h8300-dis.c
337110ea
SC
86h8500-dis.c
87h8500-opc.h
cfa8d061 88hppa-dis.c
c840244e 89i386-dis.c
720b3aed 90i960-dis.c
10cb538e
JW
91i960c-asm.c
92i960c-dis.c
93i960c-opc.c
94i960c-opc.h
35855192
DE
95m32r-asm.c
96m32r-dis.c
97m32r-opc.c
98m32r-opc.h
c840244e 99m68k-dis.c
85093dca 100m68k-opc.c
a4c01299 101m88k-dis.c
03496c49 102makefile.vms
bf1dd2fd 103mips-dis.c
69135a69 104mips-opc.c
8d67dc30 105mips16-opc.c
28e8de41
ILT
106m10200-dis.c
107m10200-opc.c
108m10300-dis.c
109m10300-opc.c
7a4f107d 110mpw-config.in
077bd46a 111mpw-make.sed
2a097d73 112ns32k-dis.c
4139b063 113opintl.h
f7934c1a 114po
89221bd5
ILT
115ppc-dis.c
116ppc-opc.c
8679a71f
SC
117sh-opc.h
118sh-dis.c
117733ad 119sparc-dis.c
c3a1191a 120sparc-opc.c
1daed53f 121stamp-h.in
50982f7f 122sysdep.h
53487a7b 123tic30-dis.c
69ad8cac 124vax-dis.c
9f744f91
SC
125w65-dis.c
126w65-opc.h
d345d883
NC
127v850-opc.c
128v850-dis.c
add1fb05 129z8k-dis.c
a4ccc310 130z8k-opc.h
ea2598e4 131z8kgen.c
add1fb05 132
87756e15
RP
133Things-to-lose:
134
62ba1060
SC
135Do-last:
136
bfc10abe
DE
137cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
138if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
139 for i in $cygnus_files ; do
140 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
141 if [ -n "${verbose}" ] ; then
142 echo Keeping cygnus stuff in $i
143 fi
144 fi
145 done
146else
147 for i in $cygnus_files ; do
148 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
149 if [ -n "${verbose}" ] ; then
150 echo Removing traces of \"cygnus\" from $i...
151 fi
152 cp $i new
153 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
154 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
155 if [ -n "${verbose}" ] ; then
156 echo Caching $i in .Recover...
9eb61c7c
JL
157 fi
158 mv $i .Recover
159 fi
160 mv new $i
161 fi
162 done
163fi
164
c29d7797 165am33_files="ChangeLog m10300-opc.c m10300-dis.c"
9eb61c7c
JL
166if ( echo $* | grep keep\-am33 > /dev/null ) ; then
167 for i in $am33_files ; do
168 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
169 if [ -n "${verbose}" ] ; then
170 echo Keeping am33 stuff in $i
171 fi
172 fi
173 done
174else
d845999e 175 for i in $am33_files ; do
9eb61c7c
JL
176 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
177 if [ -n "${verbose}" ] ; then
178 echo Removing traces of \"am33\" from $i...
179 fi
180 cp $i new
181 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
182 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
183 if [ -n "${verbose}" ] ; then
184 echo Caching $i in .Recover...
bfc10abe
DE
185 fi
186 mv $i .Recover
187 fi
188 mv new $i
189 fi
190 done
191fi
192
0ff7faaf 193
f61b671d 194v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
010916c2 195if ( echo $* | grep keep\-v850e > /dev/null ) ; then
f61b671d 196 for i in $v850e_files ; do
010916c2 197 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
f61b671d 198 if [ -n "${verbose}" ] ; then
010916c2 199 echo Keeping v850e stuff in $i
f61b671d
NC
200 fi
201 fi
202 done
010916c2 203else
f61b671d 204 for i in $v850e_files ; do
ab11a82c 205 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
f61b671d 206 if [ -n "${verbose}" ] ; then
010916c2 207 echo Removing traces of \"v850e\" from $i...
f61b671d
NC
208 fi
209 cp $i new
ab11a82c 210 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
f61b671d
NC
211 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
212 if [ -n "${verbose}" ] ; then
213 echo Caching $i in .Recover...
214 fi
215 mv $i .Recover
216 fi
217 mv new $i
218 fi
219 done
220fi
221
ab11a82c 222
ffee80df 223r5900_files="ChangeLog mips-opc.c mips-dis.c Makefile.am Makefile.in"
276c2d7d
GRK
224if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
225 for i in $r5900_files ; do
226 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
227 if [ -n "${verbose}" ] ; then
228 echo Keeping r5900 stuff in $i
229 fi
230 fi
231 done
232else
233 for i in $r5900_files ; do
234 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
235 if [ -n "${verbose}" ] ; then
236 echo Removing traces of \"r5900\" from $i...
237 fi
238 cp $i new
239 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
240 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
241 if [ -n "${verbose}" ] ; then
6d1e1ee8
C
242 echo Caching $i in .Recover...
243 fi
244 mv $i .Recover
245 fi
246 mv new $i
247 fi
248 done
249fi
250
779b65bf
GRK
251vr4320_files="ChangeLog mips-opc.c mips-dis.c"
252if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
253 for i in $vr4320_files ; do
254 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
255 if [ -n "${verbose}" ] ; then
256 echo Keeping vr4320 stuff in $i
257 fi
258 fi
259 done
260else
261 for i in $vr4320_files ; do
262 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
263 if [ -n "${verbose}" ] ; then
264 echo Removing traces of \"vr4320\" from $i...
265 fi
266 cp $i new
267 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
268 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
269 if [ -n "${verbose}" ] ; then
f14397f0
GRK
270 echo Caching $i in .Recover...
271 fi
272 mv $i .Recover
273 fi
274 mv new $i
275 fi
276 done
277fi
278
279vr4xxx_files="ChangeLog mips-opc.c mips-dis.c"
280if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
281 for i in $vr4xxx_files ; do
282 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
283 if [ -n "${verbose}" ] ; then
284 echo Keeping vr4xxx stuff in $i
285 fi
286 fi
287 done
288else
289 for i in $vr4xxx_files ; do
290 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
291 if [ -n "${verbose}" ] ; then
292 echo Removing traces of \"vr4xxx\" from $i...
293 fi
294 cp $i new
295 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
296 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
297 if [ -n "${verbose}" ] ; then
779b65bf
GRK
298 echo Caching $i in .Recover...
299 fi
300 mv $i .Recover
301 fi
302 mv new $i
303 fi
304 done
305fi
306
3d759c53
KR
307cygnus_files="ChangeLog mips-opc.c mips-dis.c"
308if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
309 for i in $cygnus_files ; do
310 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
a3066d9a 311 if [ -n "${verbose}" ] ; then
3d759c53 312 echo Keeping cygnus stuff in $i
a3066d9a
KR
313 fi
314 fi
315 done
316else
3d759c53
KR
317 for i in $cygnus_files ; do
318 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
a3066d9a 319 if [ -n "${verbose}" ] ; then
3d759c53 320 echo Removing traces of \"cygnus\" from $i...
a3066d9a
KR
321 fi
322 cp $i new
3d759c53 323 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
a3066d9a
KR
324 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
325 if [ -n "${verbose}" ] ; then
326 echo Caching $i in .Recover...
327 fi
328 mv $i .Recover
329 fi
330 mv new $i
331 fi
332 done
333fi
334
83af2335 335tx19_files="ChangeLog mips16-opc.c mips-dis.c"
d9a52316
GRK
336if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
337 for i in $tx19_files ; do
338 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
339 if [ -n "${verbose}" ] ; then
340 echo Keeping tx19 stuff in $i
341 fi
342 fi
343 done
344else
345 for i in $tx19_files ; do
346 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
347 if [ -n "${verbose}" ] ; then
348 echo Removing traces of \"tx19\" from $i...
349 fi
350 cp $i new
351 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
352 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
353 if [ -n "${verbose}" ] ; then
354 echo Caching $i in .Recover...
355 fi
356 mv $i .Recover
357 fi
358 mv new $i
359 fi
360 done
361fi
362
83af2335 363tx49_files="ChangeLog mips-opc.c mips-dis.c"
0cca41d4
GRK
364if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
365 for i in $tx49_files ; do
366 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
367 if [ -n "${verbose}" ] ; then
368 echo Keeping tx49 stuff in $i
369 fi
370 fi
371 done
372else
373 for i in $tx49_files ; do
374 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
375 if [ -n "${verbose}" ] ; then
376 echo Removing traces of \"tx49\" from $i...
377 fi
378 cp $i new
379 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
380 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
381 if [ -n "${verbose}" ] ; then
382 echo Caching $i in .Recover...
383 fi
384 mv $i .Recover
385 fi
386 mv new $i
387 fi
388 done
389fi
390
a3d2e13b 391tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
6357e7f6
FF
392if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
393 for i in $tic80_files ; do
394 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
395 if [ -n "${verbose}" ] ; then
396 echo Keeping tic80 stuff in $i
397 fi
398 fi
399 done
400else
401 for i in $tic80_files ; do
402 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
403 if [ -n "${verbose}" ] ; then
404 echo Removing traces of \"tic80\" from $i...
405 fi
406 cp $i new
407 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
408 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
409 if [ -n "${verbose}" ] ; then
410 echo Caching $i in .Recover...
411 fi
412 mv $i .Recover
413 fi
414 mv new $i
415 fi
416 done
417fi
418
71e6edea
DE
419fr30_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
420if ( echo $* | grep keep\-fr30 > /dev/null ) ; then
421 for i in $fr30_files ; do
422 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
423 if [ -n "${verbose}" ] ; then
424 echo Keeping fr30 stuff in $i
425 fi
426 fi
427 done
428else
429 for i in $fr30_files ; do
430 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
431 if [ -n "${verbose}" ] ; then
432 echo Removing traces of \"fr30\" from $i...
433 fi
434 cp $i new
435 sed '/start\-sanitize\-fr30/,/end-\sanitize\-fr30/d' < $i > new
436 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
437 if [ -n "${verbose}" ] ; then
438 echo Caching $i in .Recover...
439 fi
440 mv $i .Recover
441 fi
442 mv new $i
443 fi
444 done
445fi
446
3b12e2d3
C
447coldfire_files="ChangeLog m68k-opc.c"
448if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
449 for i in $coldfire_files ; do
450 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
451 if [ -n "${verbose}" ] ; then
452 echo Keeping coldfire stuff in $i
453 fi
454 fi
455 done
456else
457 for i in $coldfire_files ; do
458 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
459 if [ -n "${verbose}" ] ; then
460 echo Removing traces of \"coldfire\" from $i...
461 fi
462 cp $i new
463 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
464 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
465 if [ -n "${verbose}" ] ; then
466 echo Caching $i in .Recover...
467 fi
468 mv $i .Recover
469 fi
470 mv new $i
471 fi
472 done
473fi
6d1e1ee8 474
37130f11 475sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
80c396f6
DE
476if ( echo $* | grep keep\-sky > /dev/null ) ; then
477 for i in $sky_files ; do
478 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
479 if [ -n "${verbose}" ] ; then
480 echo Keeping sky stuff in $i
481 fi
482 fi
483 done
484else
485 for i in $sky_files ; do
486 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
487 if [ -n "${verbose}" ] ; then
488 echo Removing traces of \"sky\" from $i...
489 fi
490 cp $i new
491 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
492 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
493 if [ -n "${verbose}" ] ; then
494 echo Caching $i in .Recover...
495 fi
496 mv $i .Recover
497 fi
498 mv new $i
499 fi
500 done
501fi
502
c62448bf
NC
503m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
504if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
505 for i in $m32rx_files ; do
506 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
507 if [ -n "${verbose}" ] ; then
508 echo Keeping m32rx stuff in $i
509 fi
510 fi
511 done
512else
513 for i in $m32rx_files ; do
514 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
515 if [ -n "${verbose}" ] ; then
516 echo Removing traces of \"m32rx\" from $i...
517 fi
518 cp $i new
0a7fed0d
DE
519 # The PIPE sanitization will be much cleaner with redact.
520 sed -e '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' \
521 -e 's/, PIPE_[A-Z]*//g' < $i > new
c62448bf
NC
522 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
523 if [ -n "${verbose}" ] ; then
524 echo Caching $i in .Recover...
525 fi
526 mv $i .Recover
527 fi
528 mv new $i
529 fi
530 done
531fi
532
52ce74dc
MM
533nortel_ppc750_files="ChangeLog ppc-opc.c"
534if ( echo $* | grep keep\-nortel-ppc750 > /dev/null ) ; then
535 for i in $nortel_ppc750_files ; do
536 if test -f $i && (grep sanitize-nortel-ppc750 $i > /dev/null) ; then
537 if [ -n "${verbose}" ] ; then
290ca45a 538 echo Keeping nortel-ppc750 stuff in $i
52ce74dc
MM
539 fi
540 fi
541 done
542else
543 for i in $nortel_ppc750_files ; do
544 if test -f $i && (grep sanitize-nortel-ppc750 $i > /dev/null) ; then
545 if [ -n "${verbose}" ] ; then
290ca45a 546 echo Removing traces of \"nortel-ppc750\" from $i...
52ce74dc
MM
547 fi
548 cp $i new
549 # The PIPE sanitization will be much cleaner with redact.
550 sed -e '/start\-sanitize\-nortel-ppc750/,/end\-sanitize\-nortel-ppc750/d' \
551 -e 's/, PIPE_[A-Z]*//g' < $i > new
552 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
553 if [ -n "${verbose}" ] ; then
554 echo Caching $i in .Recover...
555 fi
556 mv $i .Recover
557 fi
558 mv new $i
559 fi
560 done
561fi
562
53438a7b
ILT
563for i in *; do
564 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
565 echo '***' Some mentions of Sanitize are still left in opcodes/$i! 1>&2
566 fi
567done
568
569for lost in .. $lose_these_too; do
570 if test $lost != ..; then
571 for i in Makefile.am Makefile.in configure.in configure; do
572 if fgrep $lost $i >/dev/null 2>&1; then
573 echo '***' File $lost was sanitized out but is still mentioned in opcodes/$i 1>&2
574 fi
575 done
576 fi
5c680afd
MT
577done
578
8a660fab
NC
579# This must come after all other sanitizations. Re-sanitize the .pot
580# file.
581if [ -n "${verbose}" ]; then
582 echo Re-computing files for gettext ...
583fi
584
585if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
586 if [ -n "${verbose}" ]; then
587 echo Caching po/POTFILES.in in .Recover...
588 fi
589 mv po/POTFILES.in po/.Recover
590fi
591
c2400a02 592ls -1 *.[ch] cg*.in 2>/dev/null | sed -e 's,^\./,,' > po/POTFILES.in
8a660fab
NC
593
594if [ -n "${safe}" -a ! -f po/.Recover/opcodes.pot ]; then
595 if [ -n "${verbose}" ]; then
596 echo Caching po/opcodes.pot in .Recover...
597 fi
598 mv po/opcodes.pot po/.Recover
599fi
600
601# If this fails, Sanitization must fail.
6711d1ef 602xgettext -C -c -k_ -kN_ -f po/POTFILES.in -o po/opcodes.pot || exit 1
8a660fab 603
a4ccc310 604# End of file.