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