23c3e2ce0b71ea3d847e897e1b388db70abff83c
[deliverable/binutils-gdb.git] / bfd / .Sanitize
1 # .Sanitize for devo/bfd
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 tic80_files="cpu-tic80.c coff-tic80.c"
19
20 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
21 keep_these_too="${tic80_files} ${keep_these_too}"
22 else
23 lose_these_too="${tic80_files} ${lose_these_too}"
24 fi
25
26 armelf_files="elf32-arm.c"
27 if ( echo $* | grep keep\-armelf > /dev/null ) ; then
28 keep_these_too="${armelf_files} ${keep_these_too}"
29 else
30 lose_these_too="${armelf_files} ${lose_these_too}"
31 fi
32
33
34 # All files listed between the "Things-to-keep:" line and the
35 # "Do-last:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
38 # with rm -rf.
39
40 Things-to-keep:
41
42 COPYING
43 ChangeLog
44 ChangeLog-9193
45 ChangeLog-9495
46 ChangeLog-9697
47 Makefile.am
48 Makefile.in
49 PORTING
50 README
51 TODO
52 acconfig.h
53 acinclude.m4
54 aclocal.m4
55 aix386-core.c
56 aout-adobe.c
57 aout-arm.c
58 aout-encap.c
59 aout-ns32k.c
60 aout-sparcle.c
61 aout-target.h
62 aout-tic30.c
63 aout0.c
64 aout32.c
65 aout64.c
66 aoutf1.h
67 aoutx.h
68 archive.c
69 archures.c
70 bfd-in.h
71 bfd-in2.h
72 bfd.c
73 binary.c
74 bout.c
75 cache.c
76 cf-i386lynx.c
77 cf-m68klynx.c
78 cf-sparclynx.c
79 cisco-core.c
80 coff-a29k.c
81 coff-alpha.c
82 coff-apollo.c
83 coff-arm.c
84 coff-aux.c
85 coff-go32.c
86 coff-h8300.c
87 coff-h8500.c
88 coff-i386.c
89 coff-i860.c
90 coff-i960.c
91 coff-m68k.c
92 coff-m88k.c
93 coff-mips.c
94 coff-pmac.c
95 coff-ppc.c
96 coff-rs6000.c
97 coff-sh.c
98 coff-sparc.c
99 coff-stgo32.c
100 coff-svm68k.c
101 coff-tic30.c
102 coff-u68k.c
103 coff-w65.c
104 coff-we32k.c
105 coff-z8k.c
106 coffcode.h
107 coffgen.c
108 cofflink.c
109 coffswap.h
110 config.bfd
111 config.in
112 configure
113 configure.bat
114 configure.com
115 configure.host
116 configure.in
117 corefile.c
118 cpu-a29k.c
119 cpu-alpha.c
120 cpu-arc.c
121 cpu-arm.c
122 cpu-d10v.c
123 cpu-d30v.c
124 cpu-h8300.c
125 cpu-h8500.c
126 cpu-hppa.c
127 cpu-i386.c
128 cpu-i860.c
129 cpu-i960.c
130 cpu-m10200.c
131 cpu-m10300.c
132 cpu-m32r.c
133 cpu-m68k.c
134 cpu-m88k.c
135 cpu-mips.c
136 cpu-ns32k.c
137 cpu-powerpc.c
138 cpu-rs6000.c
139 cpu-sh.c
140 cpu-sparc.c
141 cpu-tic30.c
142 cpu-v850.c
143 cpu-vax.c
144 cpu-w65.c
145 cpu-we32k.c
146 cpu-z8k.c
147 demo64.c
148 dep-in.sed
149 doc
150 dwarf2.c
151 ecoff.c
152 ecofflink.c
153 ecoffswap.h
154 elf-bfd.h
155 elf-m10200.c
156 elf-m10300.c
157 elf.c
158 elf32-arc.c
159 elf32-d10v.c
160 elf32-d30v.c
161 elf32-gen.c
162 elf32-hppa.c
163 elf32-hppa.h
164 elf32-i386.c
165 elf32-i860.c
166 elf32-m32r.c
167 elf32-m68k.c
168 elf32-m88k.c
169 elf32-mips.c
170 elf32-ppc.c
171 elf32-sh.c
172 elf32-sparc.c
173 elf32-v850.c
174 elf32.c
175 elf64-alpha.c
176 elf64-gen.c
177 elf64-mips.c
178 elf64-sparc.c
179 elf64.c
180 elfcode.h
181 elfcore.h
182 elflink.c
183 elflink.h
184 elfxx-target.h
185 format.c
186 freebsd.h
187 gen-aout.c
188 genlink.h
189 go32stub.h
190 hash.c
191 host-aout.c
192 hosts
193 hp300bsd.c
194 hp300hpux.c
195 hppa_stubs.h
196 hppabsd-core.c
197 hpux-core.c
198 i386aout.c
199 i386bsd.c
200 i386dynix.c
201 i386freebsd.c
202 i386linux.c
203 i386lynx.c
204 i386mach3.c
205 i386msdos.c
206 i386netbsd.c
207 i386os9k.c
208 ieee.c
209 ihex.c
210 init.c
211 irix-core.c
212 libaout.h
213 libbfd-in.h
214 libbfd.c
215 libbfd.h
216 libcoff-in.h
217 libcoff.h
218 libecoff.h
219 libhppa.h
220 libieee.h
221 libnlm.h
222 liboasys.h
223 linker.c
224 lynx-core.c
225 m68k4knetbsd.c
226 m68klinux.c
227 m68klynx.c
228 m68knetbsd.c
229 m88kmach3.c
230 makefile.dos
231 makefile.vms
232 mipsbsd.c
233 mpw-config.in
234 mpw-make.sed
235 netbsd-core.c
236 netbsd.h
237 newsos3.c
238 nlm-target.h
239 nlm.c
240 nlm32-alpha.c
241 nlm32-i386.c
242 nlm32-ppc.c
243 nlm32-sparc.c
244 nlm32.c
245 nlm64.c
246 nlmcode.h
247 nlmswap.h
248 ns32k.h
249 ns32knetbsd.c
250 oasys.c
251 opncls.c
252 osf-core.c
253 pc532-mach.c
254 pe-arm.c
255 pe-i386.c
256 pe-ppc.c
257 pei-arm.c
258 pei-i386.c
259 pei-ppc.c
260 peicode.h
261 po
262 ppcboot.c
263 ptrace-core.c
264 reloc.c
265 reloc16.c
266 riscix.c
267 rs6000-core.c
268 section.c
269 som.c
270 som.h
271 sparclinux.c
272 sparclynx.c
273 sparcnetbsd.c
274 srec.c
275 stab-syms.c
276 stabs.c
277 stamp-h.in
278 sunos.c
279 syms.c
280 sysdep.h
281 targets.c
282 targmatch.sed
283 tekhex.c
284 trad-core.c
285 vaxnetbsd.c
286 versados.c
287 vms.c
288 vms.h
289 vms-gsd.c
290 vms-hdr.c
291 vms-misc.c
292 vms-tir.c
293 xcofflink.c
294
295 Things-to-lose:
296
297
298
299 # The lines between the "Do-last:" line and the end of the file
300 # are executed as a /bin/sh shell script after everything else is
301 # done.
302
303 Do-last:
304
305 am33_files="ChangeLog archures.c bfd-in2.h cpu-m10300.c elf-m10300.c"
306 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
307 for i in $am33_files ; do
308 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
309 if [ -n "${verbose}" ] ; then
310 echo Keeping am33 stuff in $i
311 fi
312 fi
313 done
314 else
315 for i in $am33_files ; do
316 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
317 if [ -n "${verbose}" ] ; then
318 echo Removing traces of \"am33\" from $i...
319 fi
320 cp $i new
321 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
322 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
323 if [ -n "${verbose}" ] ; then
324 echo Caching $i in .Recover...
325 fi
326 mv $i .Recover
327 fi
328 mv new $i
329 fi
330 done
331 fi
332
333 v850_files="ChangeLog ChangeLog-9697 Makefile.in Makefile.am archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h elf32-v850.c cpu-v850.c"
334 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
335 for i in $v850_files ; do
336 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
337 if [ -n "${verbose}" ] ; then
338 echo Keeping v850e stuff in $i
339 fi
340 fi
341 done
342 else
343 for i in $v850_files ; do
344 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
345 if [ -n "${verbose}" ] ; then
346 echo Removing traces of \"v850e\" from $i...
347 fi
348 cp $i new
349 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
350 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
351 if [ -n "${verbose}" ] ; then
352 echo Caching $i in .Recover...
353 fi
354 mv $i .Recover
355 fi
356 mv new $i
357 fi
358 done
359 fi
360
361 r5900_files="ChangeLog ChangeLog-9697 config.bfd archures.c bfd-in2.h cpu-mips.c elf32-mips.c libbfd.h reloc.c"
362 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
363 for i in $r5900_files ; do
364 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
365 if [ -n "${verbose}" ] ; then
366 echo Keeping r5900 stuff in $i
367 fi
368 fi
369 done
370 else
371 for i in $r5900_files ; do
372 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
373 if [ -n "${verbose}" ] ; then
374 echo Removing traces of \"r5900\" from $i...
375 fi
376 cp $i new
377 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
378 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
379 if [ -n "${verbose}" ] ; then
380 echo Caching $i in .Recover...
381 fi
382 mv $i .Recover
383 fi
384 mv new $i
385 fi
386 done
387 fi
388
389 tx19_files="archures.c bfd-in2.h cpu-mips.c"
390 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
391 for i in $tx19_files ; do
392 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
393 if [ -n "${verbose}" ] ; then
394 echo Keeping tx19 stuff in $i
395 fi
396 fi
397 done
398 else
399 for i in $tx19_files ; do
400 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
401 if [ -n "${verbose}" ] ; then
402 echo Removing traces of \"tx19\" from $i...
403 fi
404 cp $i new
405 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
406 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
407 if [ -n "${verbose}" ] ; then
408 echo Caching $i in .Recover...
409 fi
410 mv $i .Recover
411 fi
412 mv new $i
413 fi
414 done
415 fi
416
417 tx49_files="archures.c bfd-in2.h cpu-mips.c elf32-mips.c"
418 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
419 for i in $tx49_files ; do
420 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
421 if [ -n "${verbose}" ] ; then
422 echo Keeping tx49 stuff in $i
423 fi
424 fi
425 done
426 else
427 for i in $tx49_files ; do
428 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
429 if [ -n "${verbose}" ] ; then
430 echo Removing traces of \"tx49\" from $i...
431 fi
432 cp $i new
433 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
434 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
435 if [ -n "${verbose}" ] ; then
436 echo Caching $i in .Recover...
437 fi
438 mv $i .Recover
439 fi
440 mv new $i
441 fi
442 done
443 fi
444
445 tic80_files="ChangeLog ChangeLog-9697 Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
446 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
447 for i in $tic80_files ; do
448 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
449 if [ -n "${verbose}" ] ; then
450 echo Keeping tic80 stuff in $i
451 fi
452 fi
453 done
454 else
455 for i in $tic80_files ; do
456 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
457 if [ -n "${verbose}" ] ; then
458 echo Removing traces of \"tic80\" from $i...
459 fi
460 cp $i new
461 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
462 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
463 if [ -n "${verbose}" ] ; then
464 echo Caching $i in .Recover...
465 fi
466 mv $i .Recover
467 fi
468 mv new $i
469 fi
470 done
471 fi
472
473 cygnus_files="ChangeLog ChangeLog-9697 archures.c bfd-in2.h bfd-in.h cpu-mips.c elf32-mips.c"
474 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
475 for i in $cygnus_files ; do
476 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
477 if [ -n "${verbose}" ] ; then
478 echo Keeping Cygnus stuff in $i
479 fi
480 fi
481 done
482 else
483 for i in $cygnus_files ; do
484 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
485 if [ -n "${verbose}" ] ; then
486 echo Removing traces of \"cygnus\" from $i...
487 fi
488 cp $i new
489 sed '/start\-sanitize\-cygnus/,/end\-sanitize\-cygnus/d' < $i > new
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
499 fi
500
501 vr4320_files="ChangeLog archures.c bfd-in2.h cpu-mips.c elf32-mips.c"
502 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
503 for i in $vr4320_files ; do
504 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
505 if [ -n "${verbose}" ] ; then
506 echo Keeping vr4320 stuff in $i
507 fi
508 fi
509 done
510 else
511 for i in $vr4320_files ; do
512 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
513 if [ -n "${verbose}" ] ; then
514 echo Removing traces of \"vr4320\" from $i...
515 fi
516 cp $i new
517 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
518 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
519 if [ -n "${verbose}" ] ; then
520 echo Caching $i in .Recover...
521 fi
522 mv $i .Recover
523 fi
524 mv new $i
525 fi
526 done
527 fi
528
529 m32rx_files="ChangeLog ChangeLog-9697 archures.c bfd-in2.h elf32-m32r.c cpu-m32r.c"
530 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
531 for i in $m32rx_files ; do
532 if test -r $i && (grep sanitize-m32rx $i > /dev/null) ; then
533 if [ -n "${verbose}" ] ; then
534 echo Keeping m32rx stuff in $i
535 fi
536 fi
537 done
538 else
539 for i in $m32rx_files ; do
540 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
541 if [ -n "${verbose}" ] ; then
542 echo Removing traces of \"m32rx\" from $i...
543 fi
544 cp $i new
545 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
546 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
547 if [ -n "${verbose}" ] ; then
548 echo Caching $i in .Recover...
549 fi
550 mv $i .Recover
551 fi
552 mv new $i
553 fi
554 done
555 fi
556
557 sky_files="ChangeLog archures.c elf32-mips.c reloc.c cpu-mips.c config.bfd configure.in configure bfd-in2.h libbfd.h"
558 if ( echo $* | grep keep\-sky > /dev/null ) ; then
559 for i in $sky_files ; do
560 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
561 if [ -n "${verbose}" ] ; then
562 echo Keeping sky stuff in $i
563 fi
564 fi
565 done
566 else
567 for i in $sky_files ; do
568 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
569 if [ -n "${verbose}" ] ; then
570 echo Removing traces of \"sky\" from $i...
571 fi
572 cp $i new
573 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
574 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
575 if [ -n "${verbose}" ] ; then
576 echo Caching $i in .Recover...
577 fi
578 mv $i .Recover
579 fi
580 mv new $i
581 fi
582 done
583 fi
584
585 beos_files="ChangeLog config.bfd"
586 if ( echo $* | grep keep\-beos > /dev/null ) ; then
587 for i in $beos_files ; do
588 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
589 if [ -n "${verbose}" ] ; then
590 echo Keeping beos stuff in $i
591 fi
592 fi
593 done
594 else
595 for i in $beos_files ; do
596 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
597 if [ -n "${verbose}" ] ; then
598 echo Removing traces of \"beos\" from $i...
599 fi
600 cp $i new
601 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/d' < $i > new
602 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
603 if [ -n "${verbose}" ] ; then
604 echo Caching $i in .Recover...
605 fi
606 mv $i .Recover
607 fi
608 mv new $i
609 fi
610 done
611 fi
612
613 armelf_files="ChangeLog Makefile.am Makefile.in config.bfd configure configure.in elf.c targets.c"
614 if ( echo $* | grep keep\-armelf > /dev/null ) ; then
615 for i in $armelf_files ; do
616 if test ! -d $i && (grep sanitize-armelf $i > /dev/null) ; then
617 if [ -n "${verbose}" ] ; then
618 echo Keeping armelf stuff in $i
619 fi
620 fi
621 done
622 else
623 for i in $armelf_files ; do
624 if test ! -d $i && (grep sanitize-armelf $i > /dev/null) ; then
625 if [ -n "${verbose}" ] ; then
626 echo Removing traces of \"armelf\" from $i...
627 fi
628 cp $i new
629 sed '/start\-sanitize\-armelf/,/end-\sanitize\-armelf/d' < $i > new
630 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
631 if [ -n "${verbose}" ] ; then
632 echo Caching $i in .Recover...
633 fi
634 mv $i .Recover
635 fi
636 mv new $i
637 fi
638 done
639 fi
640
641 for i in * ; do
642 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
643 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
644 fi
645 done
646
647
648 # This must come after all other sanitizations. Re-sanitize the .pot
649 # file.
650 if [ -n "${verbose}" ]; then
651 echo Re-computing files for gettext ...
652 fi
653
654 if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
655 if [ -n "${verbose}" ]; then
656 echo Caching po/POTFILES.in in .Recover...
657 fi
658 mv po/POTFILES.in po/.Recover
659 fi
660 find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
661
662 if [ -n "${safe}" -a ! -f po/.Recover/bfd.pot ]; then
663 if [ -n "${verbose}" ]; then
664 echo Caching po/bfd.pot in .Recover...
665 fi
666 mv po/bfd.pot po/.Recover
667 fi
668 # If this fails, Sanitization must fail.
669 xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/bfd.pot || exit 1
670
671 # eof
This page took 0.045397 seconds and 4 git commands to generate.