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