1 # .Sanitize for devo/opcodes.
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.
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
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.
18 cygnus_files="cgen.sh cgen-asm.in cgen-dis.in cgen-opc.in"
20 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
21 keep_these_too="${cygnus_files} ${keep_these_too}"
23 lose_these_too="${cygnus_files} ${lose_these_too}"
26 d30v_files="d30v-dis.c d30v-opc.c"
28 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
29 keep_these_too="${d30v_files} ${keep_these_too}"
31 lose_these_too="${d30v_files} ${lose_these_too}"
34 tic80_files="tic80-opc.c tic80-dis.c"
36 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
37 keep_these_too="${tic80_files} ${keep_these_too}"
39 lose_these_too="${tic80_files} ${lose_these_too}"
42 sky_files="dvp-opc.c dvp-dis.c"
44 if ( echo $* | grep keep\-sky > /dev/null ) ; then
45 keep_these_too="${sky_files} ${keep_these_too}"
47 lose_these_too="${sky_files} ${lose_these_too}"
52 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
53 keep_these_too="${r5900_files} ${keep_these_too}"
55 lose_these_too="${r5900_files} ${lose_these_too}"
58 # All files listed between the "Things-to-keep:" line and the
59 # "Files-to-sed:" line will be kept. All other files will be removed.
60 # Directories listed in this section will have their own Sanitize
61 # called. Directories not listed will be removed in their entirety
136 cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
137 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
138 for i in $cygnus_files ; do
139 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
140 if [ -n "${verbose}" ] ; then
141 echo Keeping cygnus stuff in $i
146 for i in $cygnus_files ; do
147 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
148 if [ -n "${verbose}" ] ; then
149 echo Removing traces of \"cygnus\" from $i...
152 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
153 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
154 if [ -n "${verbose}" ] ; then
155 echo Caching $i in .Recover...
164 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
165 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
166 for i in $d30v_files ; do
167 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
168 if [ -n "${verbose}" ] ; then
169 echo Keeping d30v stuff in $i
174 for i in $d30v_files ; do
175 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
176 if [ -n "${verbose}" ] ; then
177 echo Removing traces of \"d30v\" from $i...
180 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
181 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
182 if [ -n "${verbose}" ] ; then
183 echo Caching $i in .Recover...
192 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
193 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
194 for i in $v850e_files ; do
195 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
196 if [ -n "${verbose}" ] ; then
197 echo Keeping v850e stuff in $i
202 for i in $v850e_files ; do
203 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
204 if [ -n "${verbose}" ] ; then
205 echo Removing traces of \"v850e\" from $i...
208 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
209 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
210 if [ -n "${verbose}" ] ; then
211 echo Caching $i in .Recover...
221 r5900_files="ChangeLog mips-opc.c mips-dis.c Makefile.am Makefile.in"
222 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
223 for i in $r5900_files ; do
224 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
225 if [ -n "${verbose}" ] ; then
226 echo Keeping r5900 stuff in $i
231 for i in $r5900_files ; do
232 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
233 if [ -n "${verbose}" ] ; then
234 echo Removing traces of \"r5900\" from $i...
237 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
238 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
239 if [ -n "${verbose}" ] ; then
240 echo Caching $i in .Recover...
249 vr4320_files="ChangeLog mips-opc.c mips-dis.c"
250 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
251 for i in $vr4320_files ; do
252 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
253 if [ -n "${verbose}" ] ; then
254 echo Keeping vr4320 stuff in $i
259 for i in $vr4320_files ; do
260 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
261 if [ -n "${verbose}" ] ; then
262 echo Removing traces of \"vr4320\" from $i...
265 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
266 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
267 if [ -n "${verbose}" ] ; then
268 echo Caching $i in .Recover...
277 vr5400_files="ChangeLog mips-opc.c mips-dis.c"
278 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
279 for i in $vr5400_files ; do
280 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
281 if [ -n "${verbose}" ] ; then
282 echo Keeping vr5400 stuff in $i
287 for i in $vr5400_files ; do
288 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
289 if [ -n "${verbose}" ] ; then
290 echo Removing traces of \"vr5400\" from $i...
293 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
294 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
295 if [ -n "${verbose}" ] ; then
296 echo Caching $i in .Recover...
305 tx19_files="ChangeLog mips16-opc.c mips-dis.c"
306 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
307 for i in $tx19_files ; do
308 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
309 if [ -n "${verbose}" ] ; then
310 echo Keeping tx19 stuff in $i
315 for i in $tx19_files ; do
316 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
317 if [ -n "${verbose}" ] ; then
318 echo Removing traces of \"tx19\" from $i...
321 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
322 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
323 if [ -n "${verbose}" ] ; then
324 echo Caching $i in .Recover...
333 tx49_files="ChangeLog mips-opc.c mips-dis.c"
334 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
335 for i in $tx49_files ; do
336 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
337 if [ -n "${verbose}" ] ; then
338 echo Keeping tx49 stuff in $i
343 for i in $tx49_files ; do
344 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
345 if [ -n "${verbose}" ] ; then
346 echo Removing traces of \"tx49\" from $i...
349 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
350 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
351 if [ -n "${verbose}" ] ; then
352 echo Caching $i in .Recover...
361 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
362 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
363 for i in $tic80_files ; do
364 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
365 if [ -n "${verbose}" ] ; then
366 echo Keeping tic80 stuff in $i
371 for i in $tic80_files ; do
372 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
373 if [ -n "${verbose}" ] ; then
374 echo Removing traces of \"tic80\" from $i...
377 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
378 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
379 if [ -n "${verbose}" ] ; then
380 echo Caching $i in .Recover...
389 coldfire_files="ChangeLog m68k-opc.c"
390 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
391 for i in $coldfire_files ; do
392 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
393 if [ -n "${verbose}" ] ; then
394 echo Keeping coldfire stuff in $i
399 for i in $coldfire_files ; do
400 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
401 if [ -n "${verbose}" ] ; then
402 echo Removing traces of \"coldfire\" from $i...
405 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
406 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
407 if [ -n "${verbose}" ] ; then
408 echo Caching $i in .Recover...
417 sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
418 if ( echo $* | grep keep\-sky > /dev/null ) ; then
419 for i in $sky_files ; do
420 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
421 if [ -n "${verbose}" ] ; then
422 echo Keeping sky stuff in $i
427 for i in $sky_files ; do
428 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
429 if [ -n "${verbose}" ] ; then
430 echo Removing traces of \"sky\" from $i...
433 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
434 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
435 if [ -n "${verbose}" ] ; then
436 echo Caching $i in .Recover...
445 m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
446 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
447 for i in $m32rx_files ; do
448 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
449 if [ -n "${verbose}" ] ; then
450 echo Keeping m32rx stuff in $i
455 for i in $m32rx_files ; do
456 if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then
457 if [ -n "${verbose}" ] ; then
458 echo Removing traces of \"m32rx\" from $i...
461 # The PIPE sanitization will be much cleaner with redact.
462 sed -e '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' \
463 -e 's/, PIPE_[A-Z]*//g' < $i > new
464 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
465 if [ -n "${verbose}" ] ; then
466 echo Caching $i in .Recover...
476 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
477 echo '***' Some mentions of Sanitize are still left in $i! 1>&2