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