* format.c (bfd_check_format_matches): If the target was
[deliverable/binutils-gdb.git] / bfd / .Sanitize
CommitLineData
7d2ac701 1# .Sanitize for devo/bfd
08942d11 2
a92c5906 3# Each directory to survive its way into a release will need a file
08942d11
RP
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
8b0f1c20 14# done in this directory.
08942d11
RP
15
16Do-first:
17
2a0a42d3
FF
18tic80_files="cpu-tic80.c coff-tic80.c"
19
20if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
21 keep_these_too="${tic80_files} ${keep_these_too}"
22else
23 lose_these_too="${tic80_files} ${lose_these_too}"
24fi
25
08942d11 26# All files listed between the "Things-to-keep:" line and the
7d2ac701 27# "Do-last:" line will be kept. All other files will be removed.
08942d11
RP
28# Directories listed in this section will have their own Sanitize
29# called. Directories not listed will be removed in their entirety
30# with rm -rf.
31
32Things-to-keep:
87756e15 33
08942d11
RP
34COPYING
35ChangeLog
06fdc311
ILT
36ChangeLog-9193
37ChangeLog-9495
38ChangeLog-9697
c0734708 39Makefile.am
08942d11 40Makefile.in
c3e964b9 41PORTING
b8760145 42README
08942d11 43TODO
b7577823 44acconfig.h
c0734708 45acinclude.m4
f515fb2f 46aclocal.m4
60ac749c 47aix386-core.c
c3e964b9 48aout-adobe.c
ff15324f 49aout-arm.c
c3e964b9 50aout-encap.c
56fbe889 51aout-ns32k.c
0cd98b92 52aout-sparcle.c
c3e964b9 53aout-target.h
e8f2efef 54aout-tic30.c
77d11284 55aout0.c
08942d11
RP
56aout32.c
57aout64.c
58aoutf1.h
08942d11
RP
59aoutx.h
60archive.c
61archures.c
901c5bfd 62bfd-in.h
b9653d81 63bfd-in2.h
08942d11 64bfd.c
c768bd3f 65binary.c
08942d11
RP
66bout.c
67cache.c
e3b5bfa8
SS
68cf-i386lynx.c
69cf-m68klynx.c
70cf-sparclynx.c
5d70e4d1 71cisco-core.c
156e3852 72coff-a29k.c
c3e964b9 73coff-alpha.c
97eb2f0c 74coff-apollo.c
d19df9b5
ILT
75coff-arm.c
76coff-aux.c
c06e55d9 77coff-go32.c
71e34032 78coff-h8300.c
ff975a2c 79coff-h8500.c
156e3852 80coff-i386.c
cf587de8 81coff-i860.c
156e3852 82coff-i960.c
c3e964b9 83coff-m68k.c
156e3852
JG
84coff-m88k.c
85coff-mips.c
63c67f3c 86coff-pmac.c
8d2a09b0 87coff-ppc.c
156e3852 88coff-rs6000.c
9faacb92 89coff-sh.c
e3b5bfa8 90coff-sparc.c
2af5a7e4 91coff-stgo32.c
ac388f2a 92coff-svm68k.c
e8f2efef 93coff-tic30.c
df61743d 94coff-u68k.c
d468a149 95coff-w65.c
7d2ac701 96coff-we32k.c
d41ab714 97coff-z8k.c
08942d11 98coffcode.h
075caafd 99coffgen.c
69645d10 100cofflink.c
075caafd 101coffswap.h
14616002 102config.bfd
936b870c 103config.in
7c1a9ec3 104configure
13b351cc 105configure.bat
0f854557 106configure.com
5a5fa368 107configure.host
c3e964b9 108configure.in
d9e771e3 109corefile.c
c3e964b9
FF
110cpu-a29k.c
111cpu-alpha.c
76af94b9 112cpu-arc.c
6c3bc2b8 113cpu-arm.c
a3c5b9a4 114cpu-d10v.c
6767a3ab 115cpu-d30v.c
025ce5c6 116cpu-fr30.c
c3e964b9
FF
117cpu-h8300.c
118cpu-h8500.c
119cpu-hppa.c
120cpu-i386.c
cf587de8 121cpu-i860.c
c3e964b9 122cpu-i960.c
7d2ac701
ILT
123cpu-m10200.c
124cpu-m10300.c
37bdd624 125cpu-m32r.c
c3e964b9
FF
126cpu-m68k.c
127cpu-m88k.c
128cpu-mips.c
e26e4fbc 129cpu-ns32k.c
384c1791 130cpu-powerpc.c
c3e964b9
FF
131cpu-rs6000.c
132cpu-sh.c
133cpu-sparc.c
e8f2efef 134cpu-tic30.c
15d82b26 135cpu-v850.c
c3e964b9 136cpu-vax.c
d468a149 137cpu-w65.c
7d2ac701 138cpu-we32k.c
c3e964b9 139cpu-z8k.c
08942d11 140demo64.c
97eb2f0c 141dep-in.sed
c3e964b9 142doc
53e4f2aa 143dwarf1.c
6ac2511d 144dwarf2.c
dae31cf5 145ecoff.c
71efdf83 146ecofflink.c
dae31cf5 147ecoffswap.h
6ab826bd 148elf-bfd.h
7d2ac701
ILT
149elf-m10200.c
150elf-m10300.c
cef91d75 151elf.c
76af94b9 152elf32-arc.c
9aff0cd7
CM
153elfarm-nabi.c
154elfarm-oabi.c
1beed5db 155elf32-arm.h
a3c5b9a4 156elf32-d10v.c
6767a3ab 157elf32-d30v.c
025ce5c6 158elf32-fr30.c
d39d83c1 159elf32-gen.c
c268b400
KR
160elf32-hppa.c
161elf32-hppa.h
4743848f
KR
162elf32-i386.c
163elf32-i860.c
37bdd624 164elf32-m32r.c
4743848f 165elf32-m68k.c
2c4f2c72
JK
166elf32-m88k.c
167elf32-mips.c
45ccfd58 168elf32-ppc.c
c86158e5 169elf32-sh.c
8d936d1f 170elf32-sparc.c
15d82b26 171elf32-v850.c
4743848f 172elf32.c
e8f46717 173elf64-alpha.c
d39d83c1 174elf64-gen.c
d1bf45aa 175elf64-mips.c
66599384 176elf64-sparc.c
4bf86ecb 177elf64.c
ef7e172e 178elfcode.h
ede4eed4
KR
179elfcore.h
180elflink.c
181elflink.h
7d2ac701 182elfxx-target.h
6f715d66 183format.c
767f22d5 184freebsd.h
608de555 185gen-aout.c
da6b2d99 186genlink.h
179ce6e1 187go32stub.h
da6b2d99 188hash.c
08942d11 189host-aout.c
90c7c720 190hosts
c3e964b9 191hp300bsd.c
c268b400 192hp300hpux.c
cef91d75 193hppa_stubs.h
8a71bf96 194hppabsd-core.c
3f933620 195hpux-core.c
b7de6963 196i386aout.c
256b39e0 197i386bsd.c
bdf1b511 198i386dynix.c
767f22d5 199i386freebsd.c
afff60cd 200i386linux.c
aef0bd99 201i386lynx.c
890eafc0 202i386mach3.c
7c2c70f3 203i386msdos.c
7d2ac701 204i386netbsd.c
f8ffa548 205i386os9k.c
08942d11 206ieee.c
ffd15489 207ihex.c
c3e964b9 208init.c
7ce1a446 209irix-core.c
141c97ea 210libaout.h
901c5bfd 211libbfd-in.h
08942d11
RP
212libbfd.c
213libbfd.h
901c5bfd 214libcoff-in.h
08942d11 215libcoff.h
a3b3dbdd 216libecoff.h
76b731f9 217libhppa.h
08942d11 218libieee.h
c3e964b9 219libnlm.h
08942d11 220liboasys.h
da6b2d99 221linker.c
3151f12f 222lynx-core.c
e295a90d 223m68k4knetbsd.c
55626bf0 224m68klinux.c
eefe075d 225m68klynx.c
ec35a1c2 226m68knetbsd.c
56fbe889 227m88kmach3.c
346a6d59 228makefile.dos
c3d8e071 229makefile.vms
044c1ba9 230mipsbsd.c
241d8883 231mpw-config.in
63c67f3c 232mpw-make.sed
fe16107d 233netbsd-core.c
a3f7a777 234netbsd.h
7d2ac701 235newsos3.c
d1f83f44 236nlm-target.h
c3e964b9 237nlm.c
1bbabdad 238nlm32-alpha.c
8fa7a236 239nlm32-i386.c
7ce8b9d1 240nlm32-ppc.c
38f422db 241nlm32-sparc.c
c3e964b9 242nlm32.c
c3e964b9
FF
243nlm64.c
244nlmcode.h
38f422db 245nlmswap.h
c877bdf1 246ns32k.h
a3f7a777 247ns32knetbsd.c
08942d11
RP
248oasys.c
249opncls.c
4346ee0f 250osf-core.c
56fbe889 251pc532-mach.c
a3444c49 252pe-arm.c
b297038d 253pe-i386.c
8d2a09b0 254pe-ppc.c
4e98461f 255pei-arm.c
b297038d 256pei-i386.c
8d2a09b0 257pei-ppc.c
4e98461f 258peicode.h
7d2ac701 259po
0d1fcbbb 260ppcboot.c
c236d8b3 261ptrace-core.c
6f715d66 262reloc.c
075caafd 263reloc16.c
6c3bc2b8 264riscix.c
cf15d9e9 265rs6000-core.c
ed9f8d94 266sco5-core.c
6f715d66 267section.c
66eca5ee
JK
268som.c
269som.h
5f792743 270sparclinux.c
e3b5bfa8 271sparclynx.c
a3f7a777 272sparcnetbsd.c
08942d11 273srec.c
7de245d3 274stab-syms.c
7d2ac701 275stabs.c
c0734708 276stamp-h.in
08942d11 277sunos.c
6f715d66 278syms.c
b7577823 279sysdep.h
08942d11 280targets.c
dee99794 281targmatch.sed
a14b2941 282tekhex.c
08942d11 283trad-core.c
eee4e8ca 284vaxnetbsd.c
c3c112fc 285versados.c
0dc4c667
ILT
286vms.c
287vms.h
288vms-gsd.c
289vms-hdr.c
290vms-misc.c
291vms-tir.c
dd984644 292xcofflink.c
08942d11 293
87756e15
RP
294Things-to-lose:
295
775d4a40 296
7d2ac701
ILT
297
298# The lines between the "Do-last:" line and the end of the file
299# are executed as a /bin/sh shell script after everything else is
300# done.
301
08942d11
RP
302Do-last:
303
1e012f70
FL
304never_files="ChangeLog"
305for i in $never_files ; do
306 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
307 if [ -n "${verbose}" ] ; then
308 echo Removing traces of \"cygnus-never\" from $i...
309 fi
310 cp $i new
311 sed '/start\-sanitize\-cygnus-never/,/end\-sanitize\-cygnus-never/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
320done
321
41cae8d4 322r5900_files="ChangeLog ChangeLog-9697 config.bfd archures.c bfd-in2.h cpu-mips.c elf32-mips.c libbfd.h reloc.c"
276c2d7d
GRK
323if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
324 for i in $r5900_files ; do
325 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
326 if [ -n "${verbose}" ] ; then
327 echo Keeping r5900 stuff in $i
328 fi
329 fi
330 done
331else
332 for i in $r5900_files ; do
333 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
334 if [ -n "${verbose}" ] ; then
335 echo Removing traces of \"r5900\" from $i...
336 fi
337 cp $i new
338 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
339 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
340 if [ -n "${verbose}" ] ; then
341 echo Caching $i in .Recover...
342 fi
343 mv $i .Recover
344 fi
345 mv new $i
346 fi
347 done
348fi
349
29410c45
JL
350tx19_files="archures.c bfd-in2.h cpu-mips.c"
351if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
352 for i in $tx19_files ; do
353 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
354 if [ -n "${verbose}" ] ; then
355 echo Keeping tx19 stuff in $i
356 fi
357 fi
358 done
359else
360 for i in $tx19_files ; do
361 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
362 if [ -n "${verbose}" ] ; then
363 echo Removing traces of \"tx19\" from $i...
364 fi
365 cp $i new
366 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
367 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
368 if [ -n "${verbose}" ] ; then
369 echo Caching $i in .Recover...
370 fi
371 mv $i .Recover
372 fi
373 mv new $i
374 fi
375 done
376fi
377
e888ecaa 378tx49_files="archures.c bfd-in2.h cpu-mips.c elf32-mips.c"
29410c45
JL
379if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
380 for i in $tx49_files ; do
381 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
382 if [ -n "${verbose}" ] ; then
383 echo Keeping tx49 stuff in $i
384 fi
385 fi
386 done
387else
388 for i in $tx49_files ; do
389 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
390 if [ -n "${verbose}" ] ; then
391 echo Removing traces of \"tx49\" from $i...
392 fi
393 cp $i new
394 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
395 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
396 if [ -n "${verbose}" ] ; then
397 echo Caching $i in .Recover...
398 fi
399 mv $i .Recover
400 fi
401 mv new $i
402 fi
403 done
404fi
405
41cae8d4 406tic80_files="ChangeLog ChangeLog-9697 Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
2a0a42d3
FF
407if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
408 for i in $tic80_files ; do
409 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
410 if [ -n "${verbose}" ] ; then
411 echo Keeping tic80 stuff in $i
412 fi
413 fi
414 done
415else
416 for i in $tic80_files ; do
417 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
418 if [ -n "${verbose}" ] ; then
419 echo Removing traces of \"tic80\" from $i...
420 fi
421 cp $i new
422 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
423 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
05cedcf6
DE
424 if [ -n "${verbose}" ] ; then
425 echo Caching $i in .Recover...
426 fi
427 mv $i .Recover
428 fi
429 mv new $i
430 fi
431 done
432fi
433
64381ab4 434cygnus_files="ChangeLog ChangeLog-9697 archures.c bfd-in2.h bfd-in.h cpu-mips.c elf32-mips.c cpu-m10300.c elf-m10300.c cpu-m32r.c elf32-m32r.c"
1a85826e
KR
435if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
436 for i in $cygnus_files ; do
437 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
c02ed6a8 438 if [ -n "${verbose}" ] ; then
1a85826e 439 echo Keeping Cygnus stuff in $i
c02ed6a8
AC
440 fi
441 fi
442 done
443else
1a85826e
KR
444 for i in $cygnus_files ; do
445 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
c02ed6a8 446 if [ -n "${verbose}" ] ; then
1a85826e 447 echo Removing traces of \"cygnus\" from $i...
c02ed6a8
AC
448 fi
449 cp $i new
3d759c53 450 sed '/start\-sanitize\-cygnus/,/end\-sanitize\-cygnus/d' < $i > new
c02ed6a8
AC
451 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
452 if [ -n "${verbose}" ] ; then
453 echo Caching $i in .Recover...
454 fi
455 mv $i .Recover
456 fi
457 mv new $i
458 fi
459 done
460fi
461
e888ecaa 462vr4320_files="ChangeLog archures.c bfd-in2.h cpu-mips.c elf32-mips.c"
ad4413e6
GRK
463if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
464 for i in $vr4320_files ; do
465 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
466 if [ -n "${verbose}" ] ; then
467 echo Keeping vr4320 stuff in $i
468 fi
469 fi
470 done
471else
472 for i in $vr4320_files ; do
473 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
474 if [ -n "${verbose}" ] ; then
475 echo Removing traces of \"vr4320\" from $i...
476 fi
477 cp $i new
478 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
479 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
480 if [ -n "${verbose}" ] ; then
481 echo Caching $i in .Recover...
482 fi
483 mv $i .Recover
484 fi
485 mv new $i
486 fi
487 done
488fi
489
f14397f0
GRK
490vr4xxx_files="ChangeLog archures.c bfd-in2.h cpu-mips.c elf32-mips.c"
491if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
492 for i in $vr4xxx_files ; do
493 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
494 if [ -n "${verbose}" ] ; then
495 echo Keeping vr4xxx stuff in $i
496 fi
497 fi
498 done
499else
500 for i in $vr4xxx_files ; do
501 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
502 if [ -n "${verbose}" ] ; then
503 echo Removing traces of \"vr4xxx\" from $i...
504 fi
505 cp $i new
506 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
507 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
508 if [ -n "${verbose}" ] ; then
509 echo Caching $i in .Recover...
510 fi
511 mv $i .Recover
512 fi
513 mv new $i
514 fi
515 done
516fi
517
a25897a9 518sky_files="ChangeLog archures.c elf32-mips.c reloc.c cpu-mips.c config.bfd configure.in configure bfd-in2.h libbfd.h"
20b2c808
DE
519if ( echo $* | grep keep\-sky > /dev/null ) ; then
520 for i in $sky_files ; do
521 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
522 if [ -n "${verbose}" ] ; then
523 echo Keeping sky stuff in $i
524 fi
525 fi
526 done
527else
528 for i in $sky_files ; do
529 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
530 if [ -n "${verbose}" ] ; then
531 echo Removing traces of \"sky\" from $i...
532 fi
533 cp $i new
534 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
535 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
536 if [ -n "${verbose}" ] ; then
537 echo Caching $i in .Recover...
538 fi
539 mv $i .Recover
540 fi
541 mv new $i
542 fi
543 done
544fi
545
c86d82ee
RH
546beos_files="ChangeLog config.bfd"
547if ( echo $* | grep keep\-beos > /dev/null ) ; then
548 for i in $beos_files ; do
549 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
550 if [ -n "${verbose}" ] ; then
551 echo Keeping beos stuff in $i
552 fi
553 fi
554 done
555else
556 for i in $beos_files ; do
557 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
558 if [ -n "${verbose}" ] ; then
559 echo Removing traces of \"beos\" from $i...
560 fi
561 cp $i new
562 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/d' < $i > new
563 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
564 if [ -n "${verbose}" ] ; then
565 echo Caching $i in .Recover...
566 fi
567 mv $i .Recover
568 fi
569 mv new $i
570 fi
571 done
572fi
573
ee1e206f 574
c6167c13
ILT
575for i in *; do
576 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
577 echo '***' Some mentions of Sanitize are still left in bfd/$i! 1>&2
578 fi
5c680afd
MT
579done
580
c6167c13
ILT
581for lost in .. $lose_these_too; do
582 if test $lost != ..; then
54e4cfaf 583 for i in Makefile.am Makefile.in config.bfd configure.host configure.in configure; do
c6167c13
ILT
584 if fgrep $lost $i >/dev/null 2>&1; then
585 echo '***' File $lost was sanitized out but is still mentioned in bfd/$i 1>&2
586 fi
587 done
588 fi
589done
3d96e9b4
TT
590
591# This must come after all other sanitizations. Re-sanitize the .pot
592# file.
593if [ -n "${verbose}" ]; then
594 echo Re-computing files for gettext ...
595fi
596
597if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
598 if [ -n "${verbose}" ]; then
599 echo Caching po/POTFILES.in in .Recover...
600 fi
601 mv po/POTFILES.in po/.Recover
602fi
603find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
604
605if [ -n "${safe}" -a ! -f po/.Recover/bfd.pot ]; then
606 if [ -n "${verbose}" ]; then
607 echo Caching po/bfd.pot in .Recover...
608 fi
609 mv po/bfd.pot po/.Recover
610fi
d6f3da9b 611# If this fails, Sanitization must fail.
c2400a02 612xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/bfd.pot || exit 1
3d96e9b4 613
7d2ac701 614# eof
This page took 0.283607 seconds and 4 git commands to generate.