* README: New file.
[platform/upstream/binutils.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 arc_files="cpu-arc.c elf32-arc.c"
19
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21         keep_these_too="${arc_files} ${keep_these_too}"
22 else
23         lose_these_too="${arc_files} ${lose_these_too}"
24 fi
25
26 d10v_files="cpu-d10v.c elf32-d10v.c"
27
28 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
29         keep_these_too="${d10v_files} ${keep_these_too}"
30 else
31         lose_these_too="${d10v_files} ${lose_these_too}"
32 fi
33
34 m32r_files="cpu-m32r.c elf32-m32r.c"
35
36 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
37         keep_these_too="${m32r_files} ${keep_these_too}"
38 else
39         lose_these_too="${m32r_files} ${lose_these_too}"
40 fi
41
42 v850_files="cpu-v850.c elf32-v850.c"
43
44 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
45         keep_these_too="${v850_files} ${keep_these_too}"
46 else
47         lose_these_too="${v850_files} ${lose_these_too}"
48 fi
49
50 # All files listed between the "Things-to-keep:" line and the
51 # "Files-to-sed:" line will be kept.  All other files will be removed.
52 # Directories listed in this section will have their own Sanitize
53 # called.  Directories not listed will be removed in their entirety
54 # with rm -rf.
55
56 Things-to-keep:
57
58 COPYING
59 ChangeLog
60 ChangeLog.1
61 ChangeLog.2
62 Makefile.in
63 PORTING
64 README
65 TODO
66 VERSION
67 acconfig.h
68 aclocal.m4
69 aix386-core.c
70 aout-adobe.c
71 aout-arm.c
72 aout-encap.c
73 aout-ns32k.c
74 aout-sparcle.c
75 aout-target.h
76 aout0.c
77 aout32.c
78 aout64.c
79 aoutf1.h
80 aoutx.h
81 archive.c
82 archures.c
83 bfd-in.h
84 bfd-in2.h
85 bfd.c
86 binary.c
87 bout.c
88 cache.c
89 cf-i386lynx.c
90 cf-m68klynx.c
91 cf-sparclynx.c
92 cisco-core.c
93 coff-a29k.c
94 coff-alpha.c
95 coff-apollo.c
96 coff-arm.c
97 coff-aux.c
98 coff-go32.c
99 coff-h8300.c
100 coff-h8500.c
101 coff-i386.c
102 coff-i860.c
103 coff-i960.c
104 coff-m68k.c
105 coff-m88k.c
106 coff-mips.c
107 coff-pmac.c
108 coff-ppc.c
109 coff-rs6000.c
110 coff-sh.c
111 coff-sparc.c
112 coff-u68k.c
113 coff-we32k.c
114 coff-w65.c
115 coff-z8k.c
116 coffcode.h
117 coffgen.c
118 cofflink.c
119 coffswap.h
120 config.bfd
121 config.h-vms
122 config.in
123 configure
124 configure.bat
125 configure.host
126 configure.in
127 corefile.c
128 cpu-a29k.c
129 cpu-alpha.c
130 cpu-arm.c
131 cpu-h8300.c
132 cpu-h8500.c
133 cpu-hppa.c
134 cpu-i386.c
135 cpu-i860.c
136 cpu-i960.c
137 cpu-m68k.c
138 cpu-m88k.c
139 cpu-mips.c
140 cpu-ns32k.c
141 cpu-powerpc.c
142 cpu-rs6000.c
143 cpu-sh.c
144 cpu-sparc.c
145 cpu-vax.c
146 cpu-we32k.c
147 cpu-w65.c
148 cpu-z8k.c
149 demo64.c
150 dep-in.sed
151 doc
152 ecoff.c
153 ecofflink.c
154 ecoffswap.h
155 elf-bfd.h
156 elf.c
157 elf32-gen.c
158 elf32-hppa.c
159 elf32-hppa.h
160 elf32-i386.c
161 elf32-i860.c
162 elf32-m68k.c
163 elf32-m88k.c
164 elf32-mips.c
165 elf32-ppc.c
166 elf32-sh.c
167 elf32-sparc.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 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 i386netbsd.c
204 i386lynx.c
205 i386mach3.c
206 i386msdos.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 newsos3.c
236 netbsd-core.c
237 netbsd.h
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 ppcboot.c
262 ptrace-core.c
263 reloc.c
264 reloc16.c
265 riscix.c
266 rs6000-core.c
267 section.c
268 som.c
269 som.h
270 sparclynx.c
271 sparcnetbsd.c
272 srec.c
273 stabs.c
274 stab-syms.c
275 sunos.c
276 syms.c
277 sysdep.h
278 targets.c
279 tekhex.c
280 trad-core.c
281 versados.c
282 xcofflink.c
283
284 Things-to-lose:
285
286
287 Do-last:
288
289 arc_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
290 if ( echo $* | grep keep\-arc > /dev/null ) ; then
291         for i in $arc_files ; do
292                 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
293                         if [ -n "${verbose}" ] ; then
294                                 echo Keeping arc stuff in $i
295                         fi
296                 fi
297         done
298 else
299         for i in $arc_files ; do
300                 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
301                         if [ -n "${verbose}" ] ; then
302                                 echo Removing traces of \"arc\" from $i...
303                         fi
304                         cp $i new
305                         sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
306                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
307                                 if [ -n "${verbose}" ] ; then
308                                         echo Caching $i in .Recover...
309                                 fi
310                                 mv $i .Recover
311                         fi
312                         mv new $i
313                 fi
314         done
315 fi
316
317 d10v_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
318 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
319         for i in $d10v_files ; do
320                 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
321                         if [ -n "${verbose}" ] ; then
322                                 echo Keeping d10v stuff in $i
323                         fi
324                 fi
325         done
326 else
327         for i in $d10v_files ; do
328                 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
329                         if [ -n "${verbose}" ] ; then
330                                 echo Removing traces of \"d10v\" from $i...
331                         fi
332                         cp $i new
333                         sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
334                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
335                                 if [ -n "${verbose}" ] ; then
336                                         echo Caching $i in .Recover...
337                                 fi
338                                 mv $i .Recover
339                         fi
340                         mv new $i
341                 fi
342         done
343 fi
344
345 m32r_files="ChangeLog Makefile.in config.bfd configure.in configure elf.c archures.c reloc.c targets.c bfd-in2.h libbfd.h"
346 if ( echo $* | grep keep\-m32r > /dev/null ) ; then
347         for i in $m32r_files ; do
348                 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
349                         if [ -n "${verbose}" ] ; then
350                                 echo Keeping m32r stuff in $i
351                         fi
352                 fi
353         done
354 else
355         for i in $m32r_files ; do
356                 if test ! -d $i && (grep sanitize-m32r $i > /dev/null) ; then
357                         if [ -n "${verbose}" ] ; then
358                                 echo Removing traces of \"m32r\" from $i...
359                         fi
360                         cp $i new
361                         sed '/start\-sanitize\-m32r/,/end-\sanitize\-m32r/d' < $i > new
362                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
363                                 if [ -n "${verbose}" ] ; then
364                                         echo Caching $i in .Recover...
365                                 fi
366                                 mv $i .Recover
367                         fi
368                         mv new $i
369                 fi
370         done
371 fi
372
373 v850_files="ChangeLog ChangeLog.2 Makefile.in archures.c reloc.c targets.c config.bfd configure.in configure bfd-in2.h elf.c libbfd.h"
374 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
375         for i in $v850_files ; do
376                 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
377                         if [ -n "${verbose}" ] ; then
378                                 echo Keeping v850 stuff in $i
379                         fi
380                 fi
381         done
382 else
383         for i in $v850_files ; do
384                 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
385                         if [ -n "${verbose}" ] ; then
386                                 echo Removing traces of \"v850\" from $i...
387                         fi
388                         cp $i new
389                         sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
390                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
391                                 if [ -n "${verbose}" ] ; then
392                                         echo Caching $i in .Recover...
393                                 fi
394                                 mv $i .Recover
395                         fi
396                         mv new $i
397                 fi
398         done
399 fi
400
401 gm_files="ChangeLog ChangeLog.2 config.bfd"
402 if ( echo $* | grep keep\-gm > /dev/null ) ; then
403         for i in $gm_files ; do
404                 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
405                         if [ -n "${verbose}" ] ; then
406                                 echo Keeping gm stuff in $i
407                         fi
408                 fi
409         done
410 else
411         for i in $gm_files ; do
412                 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
413                         if [ -n "${verbose}" ] ; then
414                                 echo Removing traces of \"gm\" from $i...
415                         fi
416                         cp $i new
417                         sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
418                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
419                                 if [ -n "${verbose}" ] ; then
420                                         echo Caching $i in .Recover...
421                                 fi
422                                 mv $i .Recover
423                         fi
424                         mv new $i
425                 fi
426         done
427 fi
428
429 for i in * ; do
430         if test ! -d $i && (grep sanitize $i > /dev/null) ; then
431                 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
432         fi
433 done
434
435 # End of file.