21590737d6fd6ef525ccb0465541daaa7669a48d
[binutils-gdb.git] / gas / config / .Sanitize
1 # .Sanitize for devo/gas/config
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
15
16 Do-first:
17
18 if [ -d vms ]; then
19 lose_these_too="vms ${lose_these_too}"
20 fi
21
22 d30v_files="tc-d30v.c tc-d30v.h"
23
24 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
25 keep_these_too="${d30v_files} ${keep_these_too}"
26 else
27 lose_these_too="${d30v_files} ${lose_these_too}"
28 fi
29
30 tic80_files="tc-tic80.c tc-tic80.h"
31
32 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
33 keep_these_too="${tic80_files} ${keep_these_too}"
34 else
35 lose_these_too="${tic80_files} ${lose_these_too}"
36 fi
37
38 # All files listed between the "Things-to-keep:" line and the
39 # "Files-to-sed:" line will be kept. All other files will be removed.
40 # Directories listed in this section will have their own Sanitize
41 # called. Directories not listed will be removed in their entirety
42 # with rm -rf.
43
44 Things-to-keep:
45
46 aout_gnu.h
47 atof-ieee.c
48 atof-tahoe.c
49 atof-vax.c
50 go32.cfg
51 e-i386coff.c
52 e-i386elf.c
53 e-mipsecoff.c
54 e-mipself.c
55 itbl-mips.h
56 m68k-parse.h
57 m68k-parse.y
58 m88k-opcode.h
59 obj-aout.c
60 obj-aout.h
61 obj-bout.c
62 obj-bout.h
63 obj-coff.c
64 obj-coff.h
65 obj-ecoff.c
66 obj-ecoff.h
67 obj-elf.c
68 obj-elf.h
69 obj-evax.c
70 obj-evax.h
71 obj-generic.c
72 obj-generic.h
73 obj-hp300.c
74 obj-hp300.h
75 obj-ieee.c
76 obj-ieee.h
77 obj-multi.c
78 obj-multi.h
79 obj-som.c
80 obj-som.h
81 obj-vms.c
82 obj-vms.h
83 tc-a29k.c
84 tc-a29k.h
85 tc-alpha.c
86 tc-alpha.h
87 tc-arc.c
88 tc-arc.h
89 tc-arm.c
90 tc-arm.h
91 tc-d10v.c
92 tc-d10v.h
93 tc-generic.c
94 tc-generic.h
95 tc-h8300.c
96 tc-h8300.h
97 tc-h8500.c
98 tc-h8500.h
99 tc-hppa.c
100 tc-hppa.h
101 tc-i386.c
102 tc-i386.h
103 tc-i860.c
104 tc-i860.h
105 tc-i960.c
106 tc-i960.h
107 tc-m32r.c
108 tc-m32r.h
109 tc-m68851.h
110 tc-m68k.c
111 tc-m68k.h
112 tc-m88k.c
113 tc-m88k.h
114 tc-mips.c
115 tc-mips.h
116 tc-mn10200.c
117 tc-mn10200.h
118 tc-mn10300.c
119 tc-mn10300.h
120 tc-ns32k.c
121 tc-ns32k.h
122 tc-ppc.c
123 tc-ppc.h
124 tc-sh.c
125 tc-sh.h
126 tc-sparc.c
127 tc-sparc.h
128 tc-tahoe.c
129 tc-tahoe.h
130 tc-v850.c
131 tc-v850.h
132 tc-vax.c
133 tc-vax.h
134 tc-w65.c
135 tc-w65.h
136 tc-z8k.c
137 tc-z8k.h
138 te-386bsd.h
139 te-aux.h
140 te-delta.h
141 te-delt88.h
142 te-dpx2.h
143 te-dynix.h
144 te-generic.h
145 te-go32.h
146 te-hp300.h
147 te-hppa.h
148 te-i386aix.h
149 te-ic960.h
150 te-linux.h
151 te-lnews.h
152 te-lynx.h
153 te-mach.h
154 te-macos.h
155 te-multi.h
156 te-nbsd.h
157 te-nbsd532.h
158 te-pc532mach.h
159 te-pe.h
160 te-ppcnw.h
161 te-psos.h
162 te-riscix.h
163 te-sparcaout.h
164 te-sun3.h
165 te-svr4.h
166 te-sysv32.h
167 vax-inst.h
168 vms-conf.h
169 vms-a-conf.h
170
171 Things-to-lose:
172
173 Do-last:
174
175 r5900_files="tc-mips.c"
176
177 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
178 for i in $r5900_files ; do
179 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
180 if [ -n "${verbose}" ] ; then
181 echo Keeping r5900 stuff in $i
182 fi
183 fi
184 done
185 else
186 for i in * ; do
187 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Removing traces of \"r5900\" from $i...
190 fi
191 cp $i new
192 sed '/start\-sanitize\-r5900/,/end\-sanitize\-r5900/d' < $i > new
193 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
194 if [ -n "${verbose}" ] ; then
195 echo Caching $i in .Recover...
196 fi
197 mv $i .Recover
198 fi
199 mv new $i
200 fi
201 done
202 fi
203
204 tx19_files="tc-mips.c"
205
206 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
207 for i in $tx19_files ; do
208 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
209 if [ -n "${verbose}" ] ; then
210 echo Keeping tx19 stuff in $i
211 fi
212 fi
213 done
214 else
215 for i in * ; do
216 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
217 if [ -n "${verbose}" ] ; then
218 echo Removing traces of \"tx19\" from $i...
219 fi
220 cp $i new
221 sed '/start\-sanitize\-tx19/,/end\-sanitize\-tx19/d' < $i > new
222 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
223 if [ -n "${verbose}" ] ; then
224 echo Caching $i in .Recover...
225 fi
226 mv $i .Recover
227 fi
228 mv new $i
229 fi
230 done
231 fi
232
233 tic80_files="obj-coff.h"
234
235 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
236 for i in $tic80_files ; do
237 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
238 if [ -n "${verbose}" ] ; then
239 echo Keeping tic80 stuff in $i
240 fi
241 fi
242 done
243 else
244 for i in * ; do
245 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
246 if [ -n "${verbose}" ] ; then
247 echo Removing traces of \"tic80\" from $i...
248 fi
249 cp $i new
250 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
251 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
252 if [ -n "${verbose}" ] ; then
253 echo Caching $i in .Recover...
254 fi
255 mv $i .Recover
256 fi
257 mv new $i
258 fi
259 done
260 fi
261
262 if [ -n "${verbose}" ] ; then
263 echo Processing \"sh4\"...
264 fi
265
266 sh4_files="tc-sh.c"
267 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
268 for i in $sh4_files ; do
269 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
270 if [ -n "${verbose}" ] ; then
271 echo Keeping sh4 stuff in $i
272 fi
273 fi
274 done
275 else
276 for i in $sh4_files ; do
277 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
278 if [ -n "${verbose}" ] ; then
279 echo Removing traces of \"sh4\" from $i...
280 fi
281 cp $i new
282 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
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 v850e_files="tc-v850.c tc-v850.h"
295 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
296 for i in $v850e_files ; do
297 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
298 if [ -n "${verbose}" ] ; then
299 echo Keeping v850e stuff in $i
300 fi
301 fi
302 done
303 else
304 for i in $v850e_files ; do
305 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
306 if [ -n "${verbose}" ] ; then
307 echo Removing traces of \"v850e\" from $i...
308 fi
309 cp $i new
310 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
311 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
312 if [ -n "${verbose}" ] ; then
313 echo Caching $i in .Recover...
314 fi
315 mv $i .Recover
316 fi
317 mv new $i
318 fi
319 done
320 fi
321
322 # End of file.