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