570deaf8cead5b00afa56df34c3e8ed0193a6f5e
[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 d30v_files="cpu-d30v.c elf32-d30v.c"
19
20 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
21 keep_these_too="${d30v_files} ${keep_these_too}"
22 else
23 lose_these_too="${d30v_files} ${lose_these_too}"
24 fi
25
26 tic80_files="cpu-tic80.c coff-tic80.c"
27
28 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
29 keep_these_too="${tic80_files} ${keep_these_too}"
30 else
31 lose_these_too="${tic80_files} ${lose_these_too}"
32 fi
33
34 # All files listed between the "Things-to-keep:" line and the
35 # "Files-to-sed:" 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.1
45 ChangeLog.2
46 Makefile.am
47 Makefile.in
48 PORTING
49 README
50 TODO
51 acconfig.h
52 acinclude.m4
53 aclocal.m4
54 aix386-core.c
55 aout-adobe.c
56 aout-arm.c
57 aout-encap.c
58 aout-ns32k.c
59 aout-sparcle.c
60 aout-target.h
61 aout0.c
62 aout32.c
63 aout64.c
64 aoutf1.h
65 aoutx.h
66 archive.c
67 archures.c
68 bfd-in.h
69 bfd-in2.h
70 bfd.c
71 binary.c
72 bout.c
73 cache.c
74 cf-i386lynx.c
75 cf-m68klynx.c
76 cf-sparclynx.c
77 cisco-core.c
78 coff-a29k.c
79 coff-alpha.c
80 coff-apollo.c
81 coff-arm.c
82 coff-aux.c
83 coff-go32.c
84 coff-h8300.c
85 coff-h8500.c
86 coff-i386.c
87 coff-i860.c
88 coff-i960.c
89 coff-m68k.c
90 coff-m88k.c
91 coff-mips.c
92 coff-pmac.c
93 coff-ppc.c
94 coff-rs6000.c
95 coff-sh.c
96 coff-sparc.c
97 coff-stgo32.c
98 coff-svm68k.c
99 coff-u68k.c
100 coff-we32k.c
101 coff-w65.c
102 coff-z8k.c
103 coffcode.h
104 coffgen.c
105 cofflink.c
106 coffswap.h
107 config.bfd
108 config.in
109 configure
110 configure.bat
111 configure.com
112 configure.host
113 configure.in
114 corefile.c
115 cpu-a29k.c
116 cpu-alpha.c
117 cpu-arc.c
118 cpu-arm.c
119 cpu-d10v.c
120 cpu-h8300.c
121 cpu-h8500.c
122 cpu-hppa.c
123 cpu-i386.c
124 cpu-i860.c
125 cpu-i960.c
126 cpu-m32r.c
127 cpu-m68k.c
128 cpu-m88k.c
129 cpu-mips.c
130 cpu-m10200.c
131 cpu-m10300.c
132 cpu-ns32k.c
133 cpu-powerpc.c
134 cpu-rs6000.c
135 cpu-sh.c
136 cpu-sparc.c
137 cpu-v850.c
138 cpu-vax.c
139 cpu-we32k.c
140 cpu-w65.c
141 cpu-z8k.c
142 demo64.c
143 dep-in.sed
144 doc
145 dwarf2.c
146 ecoff.c
147 ecofflink.c
148 ecoffswap.h
149 elf-bfd.h
150 elf.c
151 elf32-arc.c
152 elf32-d10v.c
153 elf32-gen.c
154 elf32-hppa.c
155 elf32-hppa.h
156 elf32-i386.c
157 elf32-i860.c
158 elf32-m32r.c
159 elf32-m68k.c
160 elf32-m88k.c
161 elf32-mips.c
162 elf-m10200.c
163 elf-m10300.c
164 elf32-ppc.c
165 elf32-sh.c
166 elf32-sparc.c
167 elf32-v850.c
168 elf32.c
169 elf64-alpha.c
170 elf64-gen.c
171 elf64-mips.c
172 elf64-sparc.c
173 elf64.c
174 elfxx-target.h
175 elfcode.h
176 elfcore.h
177 elflink.c
178 elflink.h
179 evax.h
180 evax-alpha.c
181 evax-egsd.c
182 evax-emh.c
183 evax-etir.c
184 evax-misc.c
185 filemode.c
186 format.c
187 freebsd.h
188 gen-aout.c
189 genlink.h
190 go32stub.h
191 hash.c
192 host-aout.c
193 hosts
194 hp300bsd.c
195 hp300hpux.c
196 hppa_stubs.h
197 hppabsd-core.c
198 hpux-core.c
199 i386aout.c
200 i386bsd.c
201 i386dynix.c
202 i386freebsd.c
203 i386linux.c
204 i386netbsd.c
205 i386lynx.c
206 i386mach3.c
207 i386msdos.c
208 i386os9k.c
209 ieee.c
210 ihex.c
211 init.c
212 irix-core.c
213 libaout.h
214 libbfd-in.h
215 libbfd.c
216 libbfd.h
217 libcoff-in.h
218 libcoff.h
219 libecoff.h
220 libhppa.h
221 libieee.h
222 libnlm.h
223 liboasys.h
224 linker.c
225 lynx-core.c
226 m68k4knetbsd.c
227 m68klinux.c
228 m68klynx.c
229 m68knetbsd.c
230 m88kmach3.c
231 makefile.dos
232 makefile.vms
233 mipsbsd.c
234 mpw-config.in
235 mpw-make.sed
236 newsos3.c
237 netbsd-core.c
238 netbsd.h
239 nlm-target.h
240 nlm.c
241 nlm32-alpha.c
242 nlm32-i386.c
243 nlm32-ppc.c
244 nlm32-sparc.c
245 nlm32.c
246 nlm64.c
247 nlmcode.h
248 nlmswap.h
249 ns32k.h
250 ns32knetbsd.c
251 oasys.c
252 opncls.c
253 osf-core.c
254 pc532-mach.c
255 pe-arm.c
256 pe-i386.c
257 pe-ppc.c
258 pei-arm.c
259 pei-i386.c
260 pei-ppc.c
261 peicode.h
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 stabs.c
276 stab-syms.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 versados.c
286 xcofflink.c
287
288 Things-to-lose:
289
290
291 Do-last:
292
293 d30v_files="ChangeLog ChangeLog.2 Makefile.in Makefile.am archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
294 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
295 for i in $d30v_files ; do
296 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
297 if [ -n "${verbose}" ] ; then
298 echo Keeping d30v stuff in $i
299 fi
300 fi
301 done
302 else
303 for i in $d30v_files ; do
304 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
305 if [ -n "${verbose}" ] ; then
306 echo Removing traces of \"d30v\" from $i...
307 fi
308 cp $i new
309 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
310 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
311 if [ -n "${verbose}" ] ; then
312 echo Caching $i in .Recover...
313 fi
314 mv $i .Recover
315 fi
316 mv new $i
317 fi
318 done
319 fi
320
321 v850_files="ChangeLog 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"
322 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
323 for i in $v850_files ; do
324 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
325 if [ -n "${verbose}" ] ; then
326 echo Keeping v850e stuff in $i
327 fi
328 fi
329 done
330 else
331 for i in $v850_files ; do
332 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
333 if [ -n "${verbose}" ] ; then
334 echo Removing traces of \"v850e\" from $i...
335 fi
336 cp $i new
337 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
338 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
339 if [ -n "${verbose}" ] ; then
340 echo Caching $i in .Recover...
341 fi
342 mv $i .Recover
343 fi
344 mv new $i
345 fi
346 done
347 fi
348
349 r5900_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-mips.c"
350 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
351 for i in $r5900_files ; do
352 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
353 if [ -n "${verbose}" ] ; then
354 echo Keeping r5900 stuff in $i
355 fi
356 fi
357 done
358 else
359 for i in $r5900_files ; do
360 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
361 if [ -n "${verbose}" ] ; then
362 echo Removing traces of \"r5900\" from $i...
363 fi
364 cp $i new
365 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
366 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
367 if [ -n "${verbose}" ] ; then
368 echo Caching $i in .Recover...
369 fi
370 mv $i .Recover
371 fi
372 mv new $i
373 fi
374 done
375 fi
376
377 tx19_files="archures.c bfd-in2.h cpu-mips.c"
378 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
379 for i in $tx19_files ; do
380 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
381 if [ -n "${verbose}" ] ; then
382 echo Keeping tx19 stuff in $i
383 fi
384 fi
385 done
386 else
387 for i in $tx19_files ; do
388 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
389 if [ -n "${verbose}" ] ; then
390 echo Removing traces of \"tx19\" from $i...
391 fi
392 cp $i new
393 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
394 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
395 if [ -n "${verbose}" ] ; then
396 echo Caching $i in .Recover...
397 fi
398 mv $i .Recover
399 fi
400 mv new $i
401 fi
402 done
403 fi
404
405 tx49_files="archures.c bfd-in2.h cpu-mips.c"
406 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
407 for i in $tx49_files ; do
408 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
409 if [ -n "${verbose}" ] ; then
410 echo Keeping tx49 stuff in $i
411 fi
412 fi
413 done
414 else
415 for i in $tx49_files ; do
416 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
417 if [ -n "${verbose}" ] ; then
418 echo Removing traces of \"tx49\" from $i...
419 fi
420 cp $i new
421 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
422 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
423 if [ -n "${verbose}" ] ; then
424 echo Caching $i in .Recover...
425 fi
426 mv $i .Recover
427 fi
428 mv new $i
429 fi
430 done
431 fi
432
433 sh4_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-sh.c"
434 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
435 for i in $sh4_files ; do
436 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
437 if [ -n "${verbose}" ] ; then
438 echo Keeping sh4 stuff in $i
439 fi
440 fi
441 done
442 else
443 for i in $sh4_files ; do
444 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
445 if [ -n "${verbose}" ] ; then
446 echo Removing traces of \"sh4\" from $i...
447 fi
448 cp $i new
449 sed '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' < $i > new
450 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
451 if [ -n "${verbose}" ] ; then
452 echo Caching $i in .Recover...
453 fi
454 mv $i .Recover
455 fi
456 mv new $i
457 fi
458 done
459 fi
460
461 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
462 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
463 for i in $tic80_files ; do
464 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
465 if [ -n "${verbose}" ] ; then
466 echo Keeping tic80 stuff in $i
467 fi
468 fi
469 done
470 else
471 for i in $tic80_files ; do
472 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
473 if [ -n "${verbose}" ] ; then
474 echo Removing traces of \"tic80\" from $i...
475 fi
476 cp $i new
477 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
478 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
479 if [ -n "${verbose}" ] ; then
480 echo Caching $i in .Recover...
481 fi
482 mv $i .Recover
483 fi
484 mv new $i
485 fi
486 done
487 fi
488
489 gm_files="ChangeLog ChangeLog.2 config.bfd"
490 if ( echo $* | grep keep\-gm > /dev/null ) ; then
491 for i in $gm_files ; do
492 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
493 if [ -n "${verbose}" ] ; then
494 echo Keeping gm stuff in $i
495 fi
496 fi
497 done
498 else
499 for i in $gm_files ; do
500 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
501 if [ -n "${verbose}" ] ; then
502 echo Removing traces of \"gm\" from $i...
503 fi
504 cp $i new
505 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
506 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
507 if [ -n "${verbose}" ] ; then
508 echo Caching $i in .Recover...
509 fi
510 mv $i .Recover
511 fi
512 mv new $i
513 fi
514 done
515 fi
516
517 vr5400_files="ChangeLog archures.c bfd-in2.h bfd-in.h cpu-mips.c"
518 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
519 for i in $vr5400_files ; do
520 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
521 if [ -n "${verbose}" ] ; then
522 echo Keeping vr5400 stuff in $i
523 fi
524 fi
525 done
526 else
527 for i in $vr5400_files ; do
528 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
529 if [ -n "${verbose}" ] ; then
530 echo Removing traces of \"vr5400\" from $i...
531 fi
532 cp $i new
533 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
534 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
535 if [ -n "${verbose}" ] ; then
536 echo Caching $i in .Recover...
537 fi
538 mv $i .Recover
539 fi
540 mv new $i
541 fi
542 done
543 fi
544
545 m32rx_files="ChangeLog archures.c bfd-in2.h elf32-m32r.c cpu-m32r.c"
546 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
547 for i in $m32rx_files ; do
548 if test -r $i && (grep sanitize-m32rx $i > /dev/null) ; then
549 if [ -n "${verbose}" ] ; then
550 echo Keeping m32rx stuff in $i
551 fi
552 fi
553 done
554 else
555 for i in $m32rx_files ; do
556 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
557 if [ -n "${verbose}" ] ; then
558 echo Removing traces of \"m32rx\" from $i...
559 fi
560 cp $i new
561 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
562 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
563 if [ -n "${verbose}" ] ; then
564 echo Caching $i in .Recover...
565 fi
566 mv $i .Recover
567 fi
568 mv new $i
569 fi
570 done
571 fi
572
573 sky_files="ChangeLog archures.c elf32-mips.c reloc.c cpu-mips.c config.bfd configure.in configure bfd-in2.h libbfd.h"
574 if ( echo $* | grep keep\-sky > /dev/null ) ; then
575 for i in $sky_files ; do
576 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
577 if [ -n "${verbose}" ] ; then
578 echo Keeping sky stuff in $i
579 fi
580 fi
581 done
582 else
583 for i in $sky_files ; do
584 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
585 if [ -n "${verbose}" ] ; then
586 echo Removing traces of \"sky\" from $i...
587 fi
588 cp $i new
589 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
590 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
591 if [ -n "${verbose}" ] ; then
592 echo Caching $i in .Recover...
593 fi
594 mv $i .Recover
595 fi
596 mv new $i
597 fi
598 done
599 fi
600
601 for i in * ; do
602 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
603 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
604 fi
605 done
606
607 # End of file.