Commit | Line | Data |
---|---|---|
8b0f1c20 | 1 | # .Sanitize for devo/bfd. |
08942d11 | 2 | |
a92c5906 | 3 | # Each directory to survive its way into a release will need a file |
08942d11 RP |
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 | |
8b0f1c20 | 14 | # done in this directory. |
08942d11 RP |
15 | |
16 | Do-first: | |
17 | ||
75c8a303 | 18 | mpw_files="mpw-config.in mpw-make.in ChangeLog.mpw" |
e4c7516b | 19 | |
75c8a303 SS |
20 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then |
21 | keep_these_too="${mpw_files} ${keep_these_too}" | |
e4c7516b | 22 | else |
75c8a303 | 23 | lose_these_too="${mpw_files} ${lose_these_too}" |
a92c5906 SS |
24 | fi |
25 | ||
03c4ce2f | 26 | rce_files="cpu-rce.c aout-rce.c" |
d94aca1a | 27 | |
03c4ce2f MT |
28 | if ( echo $* | grep keep\-rce > /dev/null ) ; then |
29 | keep_these_too="${rce_files} ${keep_these_too}" | |
d94aca1a | 30 | else |
03c4ce2f | 31 | lose_these_too="${rce_files} ${lose_these_too}" |
d94aca1a MT |
32 | fi |
33 | ||
05cedcf6 DE |
34 | arc_files="cpu-arc.c elf32-arc.c" |
35 | ||
36 | if ( echo $* | grep keep\-arc > /dev/null ) ; then | |
37 | keep_these_too="${arc_files} ${keep_these_too}" | |
38 | else | |
39 | lose_these_too="${arc_files} ${lose_these_too}" | |
40 | fi | |
41 | ||
08942d11 RP |
42 | # All files listed between the "Things-to-keep:" line and the |
43 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
44 | # Directories listed in this section will have their own Sanitize | |
45 | # called. Directories not listed will be removed in their entirety | |
46 | # with rm -rf. | |
47 | ||
48 | Things-to-keep: | |
87756e15 | 49 | |
08942d11 RP |
50 | COPYING |
51 | ChangeLog | |
ceeca31c | 52 | ChangeLog.1 |
08942d11 | 53 | Makefile.in |
c3e964b9 | 54 | PORTING |
08942d11 | 55 | TODO |
8c1891af | 56 | VERSION |
60ac749c | 57 | aix386-core.c |
c3e964b9 FF |
58 | aout-adobe.c |
59 | aout-encap.c | |
56fbe889 | 60 | aout-ns32k.c |
c3e964b9 | 61 | aout-target.h |
77d11284 | 62 | aout0.c |
08942d11 RP |
63 | aout32.c |
64 | aout64.c | |
65 | aoutf1.h | |
08942d11 RP |
66 | aoutx.h |
67 | archive.c | |
68 | archures.c | |
901c5bfd | 69 | bfd-in.h |
b9653d81 | 70 | bfd-in2.h |
08942d11 | 71 | bfd.c |
c768bd3f | 72 | binary.c |
08942d11 RP |
73 | bout.c |
74 | cache.c | |
e3b5bfa8 SS |
75 | cf-i386lynx.c |
76 | cf-m68klynx.c | |
77 | cf-sparclynx.c | |
5d70e4d1 | 78 | cisco-core.c |
156e3852 | 79 | coff-a29k.c |
c3e964b9 | 80 | coff-alpha.c |
97eb2f0c | 81 | coff-apollo.c |
c06e55d9 | 82 | coff-go32.c |
71e34032 | 83 | coff-h8300.c |
ff975a2c | 84 | coff-h8500.c |
156e3852 JG |
85 | coff-i386.c |
86 | coff-i960.c | |
c3e964b9 | 87 | coff-m68k.c |
156e3852 JG |
88 | coff-m88k.c |
89 | coff-mips.c | |
90 | coff-rs6000.c | |
9faacb92 | 91 | coff-sh.c |
e3b5bfa8 | 92 | coff-sparc.c |
df61743d | 93 | coff-u68k.c |
c7551f76 | 94 | coff-we32k.c |
d41ab714 | 95 | coff-z8k.c |
08942d11 | 96 | coffcode.h |
075caafd | 97 | coffgen.c |
69645d10 | 98 | cofflink.c |
075caafd | 99 | coffswap.h |
fb1c4481 | 100 | config |
14616002 | 101 | config.bfd |
13b351cc | 102 | configure.bat |
5a5fa368 | 103 | configure.host |
c3e964b9 | 104 | configure.in |
6f715d66 | 105 | core.c |
c3e964b9 FF |
106 | cpu-a29k.c |
107 | cpu-alpha.c | |
6c3bc2b8 | 108 | cpu-arm.c |
c3e964b9 FF |
109 | cpu-h8300.c |
110 | cpu-h8500.c | |
111 | cpu-hppa.c | |
112 | cpu-i386.c | |
113 | cpu-i960.c | |
114 | cpu-m68k.c | |
115 | cpu-m88k.c | |
116 | cpu-mips.c | |
e26e4fbc | 117 | cpu-ns32k.c |
384c1791 | 118 | cpu-powerpc.c |
c3e964b9 FF |
119 | cpu-rs6000.c |
120 | cpu-sh.c | |
121 | cpu-sparc.c | |
122 | cpu-vax.c | |
123 | cpu-we32k.c | |
124 | cpu-z8k.c | |
08942d11 | 125 | demo64.c |
97eb2f0c | 126 | dep-in.sed |
c3e964b9 | 127 | doc |
dae31cf5 | 128 | ecoff.c |
71efdf83 | 129 | ecofflink.c |
dae31cf5 | 130 | ecoffswap.h |
cef91d75 | 131 | elf.c |
d39d83c1 | 132 | elf32-gen.c |
c268b400 KR |
133 | elf32-hppa.c |
134 | elf32-hppa.h | |
4743848f KR |
135 | elf32-i386.c |
136 | elf32-i860.c | |
137 | elf32-m68k.c | |
2c4f2c72 JK |
138 | elf32-m88k.c |
139 | elf32-mips.c | |
45ccfd58 | 140 | elf32-ppc.c |
8d936d1f | 141 | elf32-sparc.c |
4743848f KR |
142 | elf32-target.h |
143 | elf32.c | |
d39d83c1 | 144 | elf64-gen.c |
66599384 | 145 | elf64-sparc.c |
b864c03c | 146 | elf64-target.h |
4bf86ecb | 147 | elf64.c |
ef7e172e | 148 | elfcode.h |
08942d11 | 149 | filemode.c |
6f715d66 | 150 | format.c |
608de555 | 151 | gen-aout.c |
da6b2d99 ILT |
152 | genlink.h |
153 | hash.c | |
08942d11 | 154 | host-aout.c |
90c7c720 | 155 | hosts |
c3e964b9 | 156 | hp300bsd.c |
c268b400 | 157 | hp300hpux.c |
cef91d75 | 158 | hppa_stubs.h |
8a71bf96 | 159 | hppabsd-core.c |
3f933620 | 160 | hpux-core.c |
b7de6963 | 161 | i386aout.c |
256b39e0 | 162 | i386bsd.c |
bdf1b511 | 163 | i386dynix.c |
afff60cd | 164 | i386linux.c |
a3f7a777 | 165 | i386netbsd.c |
aef0bd99 | 166 | i386lynx.c |
890eafc0 | 167 | i386mach3.c |
f8ffa548 | 168 | i386os9k.c |
08942d11 | 169 | ieee.c |
c3e964b9 | 170 | init.c |
7ce1a446 | 171 | irix-core.c |
141c97ea | 172 | libaout.h |
901c5bfd | 173 | libbfd-in.h |
08942d11 RP |
174 | libbfd.c |
175 | libbfd.h | |
901c5bfd | 176 | libcoff-in.h |
08942d11 | 177 | libcoff.h |
a3b3dbdd | 178 | libecoff.h |
c3e964b9 | 179 | libelf.h |
76b731f9 | 180 | libhppa.h |
08942d11 | 181 | libieee.h |
c3e964b9 | 182 | libnlm.h |
08942d11 | 183 | liboasys.h |
da6b2d99 | 184 | linker.c |
3151f12f | 185 | lynx-core.c |
eefe075d | 186 | m68klynx.c |
ec35a1c2 | 187 | m68knetbsd.c |
56fbe889 | 188 | m88kmach3.c |
346a6d59 | 189 | makefile.dos |
044c1ba9 | 190 | mipsbsd.c |
08942d11 | 191 | newsos3.c |
a3f7a777 | 192 | netbsd.h |
d1f83f44 | 193 | nlm-target.h |
c3e964b9 | 194 | nlm.c |
1bbabdad | 195 | nlm32-alpha.c |
8fa7a236 | 196 | nlm32-i386.c |
7ce8b9d1 | 197 | nlm32-ppc.c |
38f422db | 198 | nlm32-sparc.c |
c3e964b9 | 199 | nlm32.c |
c3e964b9 FF |
200 | nlm64.c |
201 | nlmcode.h | |
38f422db | 202 | nlmswap.h |
a3f7a777 | 203 | ns32knetbsd.c |
08942d11 RP |
204 | oasys.c |
205 | opncls.c | |
4346ee0f | 206 | osf-core.c |
56fbe889 | 207 | pc532-mach.c |
c236d8b3 | 208 | ptrace-core.c |
6f715d66 | 209 | reloc.c |
075caafd | 210 | reloc16.c |
6c3bc2b8 | 211 | riscix.c |
cf15d9e9 | 212 | rs6000-core.c |
6f715d66 | 213 | section.c |
66eca5ee JK |
214 | som.c |
215 | som.h | |
e3b5bfa8 | 216 | sparclynx.c |
a3f7a777 | 217 | sparcnetbsd.c |
08942d11 | 218 | srec.c |
7de245d3 | 219 | stab-syms.c |
08942d11 | 220 | sunos.c |
6f715d66 | 221 | syms.c |
08942d11 | 222 | targets.c |
a14b2941 | 223 | tekhex.c |
08942d11 | 224 | trad-core.c |
08942d11 | 225 | |
87756e15 RP |
226 | Things-to-lose: |
227 | ||
775d4a40 | 228 | |
08942d11 RP |
229 | Do-last: |
230 | ||
5c680afd | 231 | mpwfiles="ecoffswap.h coffswap.h" |
fbe3316a SS |
232 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then |
233 | if [ -n "${verbose}" ] ; then | |
234 | echo Keeping mpw stuff in $mpwfiles. | |
235 | fi | |
236 | else | |
237 | if [ -n "${verbose}" ]; then | |
238 | echo -n Cleaning mpw in `pwd`: | |
239 | fi | |
240 | for f in $mpwfiles ; do | |
241 | if [ -n "${verbose}" ] ; then | |
242 | echo -n " " $f | |
243 | fi | |
244 | sed '/start\-sanitize\-mpw/,/end\-sanitize\-mpw/d' < $f > new | |
245 | if [ -n "${safe}" ] ; then | |
246 | mv $f .Recover | |
247 | fi | |
248 | mv new $f | |
249 | done | |
250 | chmod a+x config.bfd | |
251 | fi | |
252 | ||
e26e4fbc KR |
253 | i960xl_files="ChangeLog archures.c bfd-in2.h cpu-i960.c coffcode.h" |
254 | if ( echo $* | grep keep\-i960xl > /dev/null ) ; then | |
255 | if [ -n "${verbose}" ] ; then | |
256 | echo Keeping i960xl stuff in $i960xl_files. | |
257 | fi | |
258 | else | |
259 | if [ -n "${verbose}" ]; then | |
260 | echo -n Cleaning i960xl in `pwd`: | |
261 | fi | |
262 | for f in $i960xl_files ; do | |
263 | if [ -n "${verbose}" ] ; then | |
264 | echo -n " " $f | |
265 | fi | |
266 | sed -e '/start\-sanitize\-i960xl/,/end\-sanitize\-i960xl/d' < $f > new | |
267 | if [ -n "${safe}" ] ; then | |
268 | mv $f .Recover | |
269 | fi | |
270 | mv new $f | |
271 | done | |
272 | fi | |
273 | ||
fb870b50 | 274 | rce_files="ChangeLog archures.c bfd-in2.h config.bfd configure.in targets.c aoutx.h libaout.h" |
03c4ce2f MT |
275 | if ( echo $* | grep keep\-rce > /dev/null ) ; then |
276 | for i in $rce_files ; do | |
277 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 278 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 279 | echo Keeping rce stuff in $i |
5c680afd MT |
280 | fi |
281 | fi | |
282 | done | |
283 | else | |
03c4ce2f MT |
284 | for i in $rce_files ; do |
285 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 286 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 287 | echo Removing traces of \"rce\" from $i... |
5c680afd MT |
288 | fi |
289 | cp $i new | |
03c4ce2f | 290 | sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new |
5c680afd MT |
291 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
292 | if [ -n "${verbose}" ] ; then | |
293 | echo Caching $i in .Recover... | |
294 | fi | |
295 | mv $i .Recover | |
296 | fi | |
297 | mv new $i | |
298 | fi | |
299 | done | |
300 | fi | |
301 | ||
05cedcf6 DE |
302 | arc_files="ChangeLog archures.c reloc.c targets.c config.bfd configure.in bfd-in2.h elfcode.h libbfd.h" |
303 | if ( echo $* | grep keep\-arc > /dev/null ) ; then | |
304 | for i in $arc_files ; do | |
305 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
306 | if [ -n "${verbose}" ] ; then | |
307 | echo Keeping arc stuff in $i | |
308 | fi | |
309 | fi | |
310 | done | |
311 | else | |
312 | for i in $arc_files ; do | |
313 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
314 | if [ -n "${verbose}" ] ; then | |
315 | echo Removing traces of \"arc\" from $i... | |
316 | fi | |
317 | cp $i new | |
318 | sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new | |
319 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
320 | if [ -n "${verbose}" ] ; then | |
321 | echo Caching $i in .Recover... | |
322 | fi | |
323 | mv $i .Recover | |
324 | fi | |
325 | mv new $i | |
326 | fi | |
327 | done | |
328 | fi | |
329 | ||
5c680afd MT |
330 | for i in * ; do |
331 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
332 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
333 | fi | |
334 | done | |
335 | ||
08942d11 | 336 | # End of file. |