Detect the absence of a symbol hash table.
[deliverable/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
35855192
DE
91m32r-asm.c
92m32r-dis.c
93m32r-opc.c
94m32r-opc.h
c840244e 95m68k-dis.c
85093dca 96m68k-opc.c
a4c01299 97m88k-dis.c
03496c49 98makefile.vms
bf1dd2fd 99mips-dis.c
69135a69 100mips-opc.c
8d67dc30 101mips16-opc.c
28e8de41
ILT
102m10200-dis.c
103m10200-opc.c
104m10300-dis.c
105m10300-opc.c
7a4f107d 106mpw-config.in
077bd46a 107mpw-make.sed
2a097d73 108ns32k-dis.c
4139b063 109opintl.h
f7934c1a 110po
89221bd5
ILT
111ppc-dis.c
112ppc-opc.c
8679a71f
SC
113sh-opc.h
114sh-dis.c
117733ad 115sparc-dis.c
c3a1191a 116sparc-opc.c
1daed53f 117stamp-h.in
50982f7f 118sysdep.h
53487a7b 119tic30-dis.c
69ad8cac 120vax-dis.c
9f744f91
SC
121w65-dis.c
122w65-opc.h
d345d883
NC
123v850-opc.c
124v850-dis.c
add1fb05 125z8k-dis.c
a4ccc310 126z8k-opc.h
ea2598e4 127z8kgen.c
add1fb05 128
87756e15
RP
129Things-to-lose:
130
62ba1060
SC
131Do-last:
132
bfc10abe
DE
133cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
134if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
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 Keeping cygnus stuff in $i
139 fi
140 fi
141 done
142else
143 for i in $cygnus_files ; do
144 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Removing traces of \"cygnus\" from $i...
147 fi
148 cp $i new
149 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
150 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
151 if [ -n "${verbose}" ] ; then
152 echo Caching $i in .Recover...
9eb61c7c
JL
153 fi
154 mv $i .Recover
155 fi
156 mv new $i
157 fi
158 done
159fi
160
c29d7797 161am33_files="ChangeLog m10300-opc.c m10300-dis.c"
9eb61c7c
JL
162if ( echo $* | grep keep\-am33 > /dev/null ) ; then
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 Keeping am33 stuff in $i
167 fi
168 fi
169 done
170else
d845999e 171 for i in $am33_files ; do
9eb61c7c
JL
172 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
173 if [ -n "${verbose}" ] ; then
174 echo Removing traces of \"am33\" from $i...
175 fi
176 cp $i new
177 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
178 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
179 if [ -n "${verbose}" ] ; then
180 echo Caching $i in .Recover...
bfc10abe
DE
181 fi
182 mv $i .Recover
183 fi
184 mv new $i
185 fi
186 done
187fi
188
0ff7faaf 189
f61b671d 190v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
010916c2 191if ( echo $* | grep keep\-v850e > /dev/null ) ; then
f61b671d 192 for i in $v850e_files ; do
010916c2 193 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
f61b671d 194 if [ -n "${verbose}" ] ; then
010916c2 195 echo Keeping v850e stuff in $i
f61b671d
NC
196 fi
197 fi
198 done
010916c2 199else
f61b671d 200 for i in $v850e_files ; do
ab11a82c 201 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
f61b671d 202 if [ -n "${verbose}" ] ; then
010916c2 203 echo Removing traces of \"v850e\" from $i...
f61b671d
NC
204 fi
205 cp $i new
ab11a82c 206 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
f61b671d
NC
207 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
208 if [ -n "${verbose}" ] ; then
209 echo Caching $i in .Recover...
210 fi
211 mv $i .Recover
212 fi
213 mv new $i
214 fi
215 done
216fi
217
ab11a82c 218
ffee80df 219r5900_files="ChangeLog mips-opc.c mips-dis.c Makefile.am Makefile.in"
276c2d7d
GRK
220if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
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 Keeping r5900 stuff in $i
225 fi
226 fi
227 done
228else
229 for i in $r5900_files ; do
230 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
231 if [ -n "${verbose}" ] ; then
232 echo Removing traces of \"r5900\" from $i...
233 fi
234 cp $i new
235 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
236 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
237 if [ -n "${verbose}" ] ; then
6d1e1ee8
C
238 echo Caching $i in .Recover...
239 fi
240 mv $i .Recover
241 fi
242 mv new $i
243 fi
244 done
245fi
246
779b65bf
GRK
247vr4320_files="ChangeLog mips-opc.c mips-dis.c"
248if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
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 Keeping vr4320 stuff in $i
253 fi
254 fi
255 done
256else
257 for i in $vr4320_files ; do
258 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
259 if [ -n "${verbose}" ] ; then
260 echo Removing traces of \"vr4320\" from $i...
261 fi
262 cp $i new
263 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
264 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
265 if [ -n "${verbose}" ] ; then
266 echo Caching $i in .Recover...
267 fi
268 mv $i .Recover
269 fi
270 mv new $i
271 fi
272 done
273fi
274
3d759c53
KR
275cygnus_files="ChangeLog mips-opc.c mips-dis.c"
276if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
277 for i in $cygnus_files ; do
278 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
a3066d9a 279 if [ -n "${verbose}" ] ; then
3d759c53 280 echo Keeping cygnus stuff in $i
a3066d9a
KR
281 fi
282 fi
283 done
284else
3d759c53
KR
285 for i in $cygnus_files ; do
286 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
a3066d9a 287 if [ -n "${verbose}" ] ; then
3d759c53 288 echo Removing traces of \"cygnus\" from $i...
a3066d9a
KR
289 fi
290 cp $i new
3d759c53 291 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
a3066d9a
KR
292 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
293 if [ -n "${verbose}" ] ; then
294 echo Caching $i in .Recover...
295 fi
296 mv $i .Recover
297 fi
298 mv new $i
299 fi
300 done
301fi
302
83af2335 303tx19_files="ChangeLog mips16-opc.c mips-dis.c"
d9a52316
GRK
304if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
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 Keeping tx19 stuff in $i
309 fi
310 fi
311 done
312else
313 for i in $tx19_files ; do
314 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
315 if [ -n "${verbose}" ] ; then
316 echo Removing traces of \"tx19\" from $i...
317 fi
318 cp $i new
319 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
320 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
321 if [ -n "${verbose}" ] ; then
322 echo Caching $i in .Recover...
323 fi
324 mv $i .Recover
325 fi
326 mv new $i
327 fi
328 done
329fi
330
83af2335 331tx49_files="ChangeLog mips-opc.c mips-dis.c"
0cca41d4
GRK
332if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
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 Keeping tx49 stuff in $i
337 fi
338 fi
339 done
340else
341 for i in $tx49_files ; do
342 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
343 if [ -n "${verbose}" ] ; then
344 echo Removing traces of \"tx49\" from $i...
345 fi
346 cp $i new
347 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
348 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
349 if [ -n "${verbose}" ] ; then
350 echo Caching $i in .Recover...
351 fi
352 mv $i .Recover
353 fi
354 mv new $i
355 fi
356 done
357fi
358
a3d2e13b 359tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
6357e7f6
FF
360if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
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 Keeping tic80 stuff in $i
365 fi
366 fi
367 done
368else
369 for i in $tic80_files ; do
370 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
371 if [ -n "${verbose}" ] ; then
372 echo Removing traces of \"tic80\" from $i...
373 fi
374 cp $i new
375 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
376 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
377 if [ -n "${verbose}" ] ; then
378 echo Caching $i in .Recover...
379 fi
380 mv $i .Recover
381 fi
382 mv new $i
383 fi
384 done
385fi
386
71e6edea
DE
387fr30_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
388if ( echo $* | grep keep\-fr30 > /dev/null ) ; then
389 for i in $fr30_files ; do
390 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
391 if [ -n "${verbose}" ] ; then
392 echo Keeping fr30 stuff in $i
393 fi
394 fi
395 done
396else
397 for i in $fr30_files ; do
398 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
399 if [ -n "${verbose}" ] ; then
400 echo Removing traces of \"fr30\" from $i...
401 fi
402 cp $i new
403 sed '/start\-sanitize\-fr30/,/end-\sanitize\-fr30/d' < $i > new
404 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
405 if [ -n "${verbose}" ] ; then
406 echo Caching $i in .Recover...
407 fi
408 mv $i .Recover
409 fi
410 mv new $i
411 fi
412 done
413fi
414
3b12e2d3
C
415coldfire_files="ChangeLog m68k-opc.c"
416if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
417 for i in $coldfire_files ; do
418 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
419 if [ -n "${verbose}" ] ; then
420 echo Keeping coldfire stuff in $i
421 fi
422 fi
423 done
424else
425 for i in $coldfire_files ; do
426 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
427 if [ -n "${verbose}" ] ; then
428 echo Removing traces of \"coldfire\" from $i...
429 fi
430 cp $i new
431 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
432 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
433 if [ -n "${verbose}" ] ; then
434 echo Caching $i in .Recover...
435 fi
436 mv $i .Recover
437 fi
438 mv new $i
439 fi
440 done
441fi
6d1e1ee8 442
37130f11 443sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
80c396f6
DE
444if ( echo $* | grep keep\-sky > /dev/null ) ; then
445 for i in $sky_files ; do
446 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
447 if [ -n "${verbose}" ] ; then
448 echo Keeping sky stuff in $i
449 fi
450 fi
451 done
452else
453 for i in $sky_files ; do
454 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
455 if [ -n "${verbose}" ] ; then
456 echo Removing traces of \"sky\" from $i...
457 fi
458 cp $i new
459 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
460 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
461 if [ -n "${verbose}" ] ; then
462 echo Caching $i in .Recover...
463 fi
464 mv $i .Recover
465 fi
466 mv new $i
467 fi
468 done
469fi
470
c62448bf
NC
471m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
472if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
473 for i in $m32rx_files ; do
474 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
475 if [ -n "${verbose}" ] ; then
476 echo Keeping m32rx stuff in $i
477 fi
478 fi
479 done
480else
481 for i in $m32rx_files ; do
482 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
483 if [ -n "${verbose}" ] ; then
484 echo Removing traces of \"m32rx\" from $i...
485 fi
486 cp $i new
0a7fed0d
DE
487 # The PIPE sanitization will be much cleaner with redact.
488 sed -e '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' \
489 -e 's/, PIPE_[A-Z]*//g' < $i > new
c62448bf
NC
490 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
491 if [ -n "${verbose}" ] ; then
492 echo Caching $i in .Recover...
493 fi
494 mv $i .Recover
495 fi
496 mv new $i
497 fi
498 done
499fi
500
52ce74dc
MM
501nortel_ppc750_files="ChangeLog ppc-opc.c"
502if ( echo $* | grep keep\-nortel-ppc750 > /dev/null ) ; then
503 for i in $nortel_ppc750_files ; do
504 if test -f $i && (grep sanitize-nortel-ppc750 $i > /dev/null) ; then
505 if [ -n "${verbose}" ] ; then
290ca45a 506 echo Keeping nortel-ppc750 stuff in $i
52ce74dc
MM
507 fi
508 fi
509 done
510else
511 for i in $nortel_ppc750_files ; do
512 if test -f $i && (grep sanitize-nortel-ppc750 $i > /dev/null) ; then
513 if [ -n "${verbose}" ] ; then
290ca45a 514 echo Removing traces of \"nortel-ppc750\" from $i...
52ce74dc
MM
515 fi
516 cp $i new
517 # The PIPE sanitization will be much cleaner with redact.
518 sed -e '/start\-sanitize\-nortel-ppc750/,/end\-sanitize\-nortel-ppc750/d' \
519 -e 's/, PIPE_[A-Z]*//g' < $i > new
520 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
521 if [ -n "${verbose}" ] ; then
522 echo Caching $i in .Recover...
523 fi
524 mv $i .Recover
525 fi
526 mv new $i
527 fi
528 done
529fi
530
53438a7b
ILT
531for i in *; do
532 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
533 echo '***' Some mentions of Sanitize are still left in opcodes/$i! 1>&2
534 fi
535done
536
537for lost in .. $lose_these_too; do
538 if test $lost != ..; then
539 for i in Makefile.am Makefile.in configure.in configure; do
540 if fgrep $lost $i >/dev/null 2>&1; then
541 echo '***' File $lost was sanitized out but is still mentioned in opcodes/$i 1>&2
542 fi
543 done
544 fi
5c680afd
MT
545done
546
8a660fab
NC
547# This must come after all other sanitizations. Re-sanitize the .pot
548# file.
549if [ -n "${verbose}" ]; then
550 echo Re-computing files for gettext ...
551fi
552
553if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
554 if [ -n "${verbose}" ]; then
555 echo Caching po/POTFILES.in in .Recover...
556 fi
557 mv po/POTFILES.in po/.Recover
558fi
559
c2400a02 560ls -1 *.[ch] cg*.in 2>/dev/null | sed -e 's,^\./,,' > po/POTFILES.in
8a660fab
NC
561
562if [ -n "${safe}" -a ! -f po/.Recover/opcodes.pot ]; then
563 if [ -n "${verbose}" ]; then
564 echo Caching po/opcodes.pot in .Recover...
565 fi
566 mv po/opcodes.pot po/.Recover
567fi
568
569# If this fails, Sanitization must fail.
6711d1ef 570xgettext -C -c -k_ -kN_ -f po/POTFILES.in -o po/opcodes.pot || exit 1
8a660fab 571
a4ccc310 572# End of file.
This page took 0.240835 seconds and 4 git commands to generate.