keep files added by Niklas Hallqvist
[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 rce_files="cpu-rce.c aout-rce.c"
19
20 if ( echo $* | grep keep\-rce > /dev/null ) ; then
21         keep_these_too="${rce_files} ${keep_these_too}"
22 else
23         lose_these_too="${rce_files} ${lose_these_too}"
24 fi
25
26 arc_files="cpu-arc.c elf32-arc.c"
27
28 if ( echo $* | grep keep\-arc > /dev/null ) ; then
29         keep_these_too="${arc_files} ${keep_these_too}"
30 else
31         lose_these_too="${arc_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.in
47 PORTING
48 TODO
49 VERSION
50 acconfig.h
51 aclocal.m4
52 aix386-core.c
53 aout-adobe.c
54 aout-arm.c
55 aout-encap.c
56 aout-ns32k.c
57 aout-target.h
58 aout0.c
59 aout32.c
60 aout64.c
61 aoutf1.h
62 aoutx.h
63 archive.c
64 archures.c
65 bfd-in.h
66 bfd-in2.h
67 bfd.c
68 binary.c
69 bout.c
70 cache.c
71 cf-i386lynx.c
72 cf-m68klynx.c
73 cf-sparclynx.c
74 cisco-core.c
75 coff-a29k.c
76 coff-arm.c
77 coff-alpha.c
78 coff-apollo.c
79 coff-go32.c
80 coff-h8300.c
81 coff-h8500.c
82 coff-i386.c
83 coff-i960.c
84 coff-m68k.c
85 coff-m88k.c
86 coff-mips.c
87 coff-pmac.c
88 coff-ppc.c
89 coff-rs6000.c
90 coff-sh.c
91 coff-sparc.c
92 coff-u68k.c
93 coff-we32k.c
94 coff-w65.c
95 coff-z8k.c
96 coffcode.h
97 coffgen.c
98 cofflink.c
99 coffswap.h
100 config.bfd
101 config.in
102 configure
103 configure.bat
104 configure.host
105 configure.in
106 core.c
107 cpu-a29k.c
108 cpu-alpha.c
109 cpu-arm.c
110 cpu-h8300.c
111 cpu-h8500.c
112 cpu-hppa.c
113 cpu-i386.c
114 cpu-i960.c
115 cpu-m68k.c
116 cpu-m88k.c
117 cpu-mips.c
118 cpu-ns32k.c
119 cpu-powerpc.c
120 cpu-rs6000.c
121 cpu-sh.c
122 cpu-sparc.c
123 cpu-vax.c
124 cpu-we32k.c
125 cpu-w65.c
126 cpu-z8k.c
127 demo64.c
128 dep-in.sed
129 doc
130 ecoff.c
131 ecofflink.c
132 ecoffswap.h
133 elf.c
134 elf32-gen.c
135 elf32-hppa.c
136 elf32-hppa.h
137 elf32-i386.c
138 elf32-i860.c
139 elf32-m68k.c
140 elf32-m88k.c
141 elf32-mips.c
142 elf32-ppc.c
143 elf32-sparc.c
144 elf32.c
145 elf64-gen.c
146 elf64-sparc.c
147 elf64.c
148 elfxx-target.h
149 elfcode.h
150 elfcore.h
151 elflink.c
152 elflink.h
153 filemode.c
154 format.c
155 gen-aout.c
156 genlink.h
157 hash.c
158 host-aout.c
159 hosts
160 hp300bsd.c
161 hp300hpux.c
162 hppa_stubs.h
163 hppabsd-core.c
164 hpux-core.c
165 i386aout.c
166 i386bsd.c
167 i386dynix.c
168 i386linux.c
169 i386netbsd.c
170 i386lynx.c
171 i386mach3.c
172 i386msdos.c
173 i386os9k.c
174 ieee.c
175 init.c
176 irix-core.c
177 libaout.h
178 libbfd-in.h
179 libbfd.c
180 libbfd.h
181 libcoff-in.h
182 libcoff.h
183 libecoff.h
184 libelf.h
185 libhppa.h
186 libieee.h
187 libnlm.h
188 liboasys.h
189 linker.c
190 lynx-core.c
191 m68k4knetbsd.c
192 m68klynx.c
193 m68knetbsd.c
194 m88kmach3.c
195 makefile.dos
196 mipsbsd.c
197 mpw-config.in
198 mpw-make.sed
199 newsos3.c
200 netbsd.h
201 nlm-target.h
202 nlm.c
203 nlm32-alpha.c
204 nlm32-i386.c
205 nlm32-ppc.c
206 nlm32-sparc.c
207 nlm32.c
208 nlm64.c
209 nlmcode.h
210 nlmswap.h
211 ns32knetbsd.c
212 oasys.c
213 opncls.c
214 osf-core.c
215 pc532-mach.c
216 pe-arm.c
217 pe-i386.c
218 pe-ppc.c
219 pei-arm.c
220 pei-i386.c
221 pei-ppc.c
222 peicode.h
223 ptrace-core.c
224 reloc.c
225 reloc16.c
226 riscix.c
227 rs6000-core.c
228 section.c
229 som.c
230 som.h
231 sparclynx.c
232 sparcnetbsd.c
233 srec.c
234 stab-syms.c
235 sunos.c
236 syms.c
237 sysdep.h
238 targets.c
239 tekhex.c
240 trad-core.c
241 versados.c
242 xcofflink.c
243
244 Things-to-lose:
245
246
247 Do-last:
248
249 i960xl_files="ChangeLog ChangeLog.2 archures.c bfd-in2.h cpu-i960.c coffcode.h"
250 if ( echo $* | grep keep\-i960xl > /dev/null ) ; then
251         if [ -n "${verbose}" ] ; then
252                 echo Keeping i960xl stuff in $i960xl_files.
253         fi
254 else
255         if [ -n "${verbose}" ]; then
256                 echo -n Cleaning i960xl in `pwd`:
257         fi
258         for f in $i960xl_files ; do
259                 if [ -n "${verbose}" ] ; then
260                         echo -n " " $f
261                 fi
262                 sed -e '/start\-sanitize\-i960xl/,/end\-sanitize\-i960xl/d' < $f > new
263                 if [ -n "${safe}" ] ; then
264                         mv $f .Recover
265                 fi
266                 mv new $f
267         done
268 fi
269
270 rce_files="ChangeLog ChangeLog.2 Makefile.in archures.c bfd-in2.h config.bfd configure.in configure targets.c aoutx.h libaout.h"
271 if ( echo $* | grep keep\-rce > /dev/null ) ; then
272         for i in $rce_files ; do
273                 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
274                         if [ -n "${verbose}" ] ; then
275                                 echo Keeping rce stuff in $i
276                         fi
277                 fi
278         done
279 else
280         for i in $rce_files ; do
281                 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
282                         if [ -n "${verbose}" ] ; then
283                                 echo Removing traces of \"rce\" from $i...
284                         fi
285                         cp $i new
286                         sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
287                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
288                                 if [ -n "${verbose}" ] ; then
289                                         echo Caching $i in .Recover...
290                                 fi
291                                 mv $i .Recover
292                         fi
293                         mv new $i
294                 fi
295         done
296 fi
297
298 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"
299 if ( echo $* | grep keep\-arc > /dev/null ) ; then
300         for i in $arc_files ; do
301                 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
302                         if [ -n "${verbose}" ] ; then
303                                 echo Keeping arc stuff in $i
304                         fi
305                 fi
306         done
307 else
308         for i in $arc_files ; do
309                 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
310                         if [ -n "${verbose}" ] ; then
311                                 echo Removing traces of \"arc\" from $i...
312                         fi
313                         cp $i new
314                         sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
315                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
316                                 if [ -n "${verbose}" ] ; then
317                                         echo Caching $i in .Recover...
318                                 fi
319                                 mv $i .Recover
320                         fi
321                         mv new $i
322                 fi
323         done
324 fi
325
326 gm_files="ChangeLog ChangeLog.2 config.bfd"
327 if ( echo $* | grep keep\-gm > /dev/null ) ; then
328         for i in $gm_files ; do
329                 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
330                         if [ -n "${verbose}" ] ; then
331                                 echo Keeping gm stuff in $i
332                         fi
333                 fi
334         done
335 else
336         for i in $gm_files ; do
337                 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
338                         if [ -n "${verbose}" ] ; then
339                                 echo Removing traces of \"gm\" from $i...
340                         fi
341                         cp $i new
342                         sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
343                         if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
344                                 if [ -n "${verbose}" ] ; then
345                                         echo Caching $i in .Recover...
346                                 fi
347                                 mv $i .Recover
348                         fi
349                         mv new $i
350                 fi
351         done
352 fi
353
354 for i in * ; do
355         if test ! -d $i && (grep sanitize $i > /dev/null) ; then
356                 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
357         fi
358 done
359
360 # End of file.