fix sanitization for gettext changes
[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 # "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.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-w65.c
103 coff-we32k.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-m10200.c
129 cpu-m10300.c
130 cpu-m32r.c
131 cpu-m68k.c
132 cpu-m88k.c
133 cpu-mips.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-w65.c
143 cpu-we32k.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-m10200.c
154 elf-m10300.c
155 elf.c
156 elf32-arc.c
157 elf32-d10v.c
158 elf32-gen.c
159 elf32-hppa.c
160 elf32-hppa.h
161 elf32-i386.c
162 elf32-i860.c
163 elf32-m32r.c
164 elf32-m68k.c
165 elf32-m88k.c
166 elf32-mips.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 elfcode.h
178 elfcore.h
179 elflink.c
180 elflink.h
181 elfxx-target.h
182 evax-alpha.c
183 evax-egsd.c
184 evax-emh.c
185 evax-etir.c
186 evax-misc.c
187 evax.h
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 i386lynx.c
208 i386mach3.c
209 i386msdos.c
210 i386netbsd.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 netbsd-core.c
240 netbsd.h
241 newsos3.c
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 po
266 ppcboot.c
267 ptrace-core.c
268 reloc.c
269 reloc16.c
270 riscix.c
271 rs6000-core.c
272 section.c
273 som.c
274 som.h
275 sparclinux.c
276 sparclynx.c
277 sparcnetbsd.c
278 srec.c
279 stab-syms.c
280 stabs.c
281 stamp-h.in
282 sunos.c
283 syms.c
284 sysdep.h
285 targets.c
286 targmatch.sed
287 tekhex.c
288 trad-core.c
289 vaxnetbsd.c
290 versados.c
291 xcofflink.c
292
293 Things-to-lose:
294
295
296
297 # The lines between the "Do-last:" line and the end of the file
298 # are executed as a /bin/sh shell script after everything else is
299 # done.
300
301 Do-last:
302
303 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"
304 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
305 for i in $d30v_files ; do
306 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
307 if [ -n "${verbose}" ] ; then
308 echo Keeping d30v stuff in $i
309 fi
310 fi
311 done
312 else
313 for i in $d30v_files ; do
314 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
315 if [ -n "${verbose}" ] ; then
316 echo Removing traces of \"d30v\" from $i...
317 fi
318 cp $i new
319 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/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
329 fi
330
331 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"
332 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
333 for i in $v850_files ; do
334 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
335 if [ -n "${verbose}" ] ; then
336 echo Keeping v850e stuff in $i
337 fi
338 fi
339 done
340 else
341 for i in $v850_files ; do
342 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
343 if [ -n "${verbose}" ] ; then
344 echo Removing traces of \"v850e\" from $i...
345 fi
346 cp $i new
347 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/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
357 fi
358
359 r5900_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-mips.c elf32-mips.c libbfd.h reloc.c"
360 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
361 for i in $r5900_files ; do
362 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
363 if [ -n "${verbose}" ] ; then
364 echo Keeping r5900 stuff in $i
365 fi
366 fi
367 done
368 else
369 for i in $r5900_files ; do
370 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
371 if [ -n "${verbose}" ] ; then
372 echo Removing traces of \"r5900\" from $i...
373 fi
374 cp $i new
375 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/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
385 fi
386
387 tx19_files="archures.c bfd-in2.h cpu-mips.c"
388 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
389 for i in $tx19_files ; do
390 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
391 if [ -n "${verbose}" ] ; then
392 echo Keeping tx19 stuff in $i
393 fi
394 fi
395 done
396 else
397 for i in $tx19_files ; do
398 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
399 if [ -n "${verbose}" ] ; then
400 echo Removing traces of \"tx19\" from $i...
401 fi
402 cp $i new
403 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/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
413 fi
414
415 tx49_files="archures.c bfd-in2.h cpu-mips.c"
416 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
417 for i in $tx49_files ; do
418 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
419 if [ -n "${verbose}" ] ; then
420 echo Keeping tx49 stuff in $i
421 fi
422 fi
423 done
424 else
425 for i in $tx49_files ; do
426 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
427 if [ -n "${verbose}" ] ; then
428 echo Removing traces of \"tx49\" from $i...
429 fi
430 cp $i new
431 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/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
441 fi
442
443 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
444 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
445 for i in $tic80_files ; do
446 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
447 if [ -n "${verbose}" ] ; then
448 echo Keeping tic80 stuff in $i
449 fi
450 fi
451 done
452 else
453 for i in $tic80_files ; do
454 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
455 if [ -n "${verbose}" ] ; then
456 echo Removing traces of \"tic80\" from $i...
457 fi
458 cp $i new
459 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/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
469 fi
470
471 gm_files="ChangeLog ChangeLog.2 config.bfd"
472 if ( echo $* | grep keep\-gm > /dev/null ) ; then
473 for i in $gm_files ; do
474 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
475 if [ -n "${verbose}" ] ; then
476 echo Keeping gm stuff in $i
477 fi
478 fi
479 done
480 else
481 for i in $gm_files ; do
482 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
483 if [ -n "${verbose}" ] ; then
484 echo Removing traces of \"gm\" from $i...
485 fi
486 cp $i new
487 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
488 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
489 if [ -n "${verbose}" ] ; then
490 echo Caching $i in .Recover...
491 fi
492 mv $i .Recover
493 fi
494 mv new $i
495 fi
496 done
497 fi
498
499 vr5400_files="ChangeLog archures.c bfd-in2.h bfd-in.h cpu-mips.c"
500 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
501 for i in $vr5400_files ; do
502 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
503 if [ -n "${verbose}" ] ; then
504 echo Keeping vr5400 stuff in $i
505 fi
506 fi
507 done
508 else
509 for i in $vr5400_files ; do
510 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
511 if [ -n "${verbose}" ] ; then
512 echo Removing traces of \"vr5400\" from $i...
513 fi
514 cp $i new
515 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
516 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
517 if [ -n "${verbose}" ] ; then
518 echo Caching $i in .Recover...
519 fi
520 mv $i .Recover
521 fi
522 mv new $i
523 fi
524 done
525 fi
526
527 vr4320_files="ChangeLog archures.c bfd-in2.h cpu-mips.c"
528 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
529 for i in $vr4320_files ; do
530 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
531 if [ -n "${verbose}" ] ; then
532 echo Keeping vr4320 stuff in $i
533 fi
534 fi
535 done
536 else
537 for i in $vr4320_files ; do
538 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
539 if [ -n "${verbose}" ] ; then
540 echo Removing traces of \"vr4320\" from $i...
541 fi
542 cp $i new
543 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
544 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
545 if [ -n "${verbose}" ] ; then
546 echo Caching $i in .Recover...
547 fi
548 mv $i .Recover
549 fi
550 mv new $i
551 fi
552 done
553 fi
554
555 m32rx_files="ChangeLog archures.c bfd-in2.h elf32-m32r.c cpu-m32r.c"
556 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
557 for i in $m32rx_files ; do
558 if test -r $i && (grep sanitize-m32rx $i > /dev/null) ; then
559 if [ -n "${verbose}" ] ; then
560 echo Keeping m32rx stuff in $i
561 fi
562 fi
563 done
564 else
565 for i in $m32rx_files ; do
566 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
567 if [ -n "${verbose}" ] ; then
568 echo Removing traces of \"m32rx\" from $i...
569 fi
570 cp $i new
571 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
572 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
573 if [ -n "${verbose}" ] ; then
574 echo Caching $i in .Recover...
575 fi
576 mv $i .Recover
577 fi
578 mv new $i
579 fi
580 done
581 fi
582
583 sky_files="ChangeLog archures.c elf32-mips.c reloc.c cpu-mips.c config.bfd configure.in configure bfd-in2.h libbfd.h"
584 if ( echo $* | grep keep\-sky > /dev/null ) ; then
585 for i in $sky_files ; do
586 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
587 if [ -n "${verbose}" ] ; then
588 echo Keeping sky stuff in $i
589 fi
590 fi
591 done
592 else
593 for i in $sky_files ; do
594 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
595 if [ -n "${verbose}" ] ; then
596 echo Removing traces of \"sky\" from $i...
597 fi
598 cp $i new
599 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
600 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
601 if [ -n "${verbose}" ] ; then
602 echo Caching $i in .Recover...
603 fi
604 mv $i .Recover
605 fi
606 mv new $i
607 fi
608 done
609 fi
610
611 for i in * ; do
612 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
613 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
614 fi
615 done
616
617 # eof