1 # .Sanitize for devo/gas/config
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
19 lose_these_too="vms ${lose_these_too}"
22 d30v_files="tc-d30v.c tc-d30v.h"
24 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
25 keep_these_too="${d30v_files} ${keep_these_too}"
27 lose_these_too="${d30v_files} ${lose_these_too}"
30 tic80_files="tc-tic80.c tc-tic80.h"
32 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
33 keep_these_too="${tic80_files} ${keep_these_too}"
35 lose_these_too="${tic80_files} ${lose_these_too}"
38 sky_files="tc-dvp.c tc-dvp.h"
40 if ( echo $* | grep keep\-sky > /dev/null ) ; then
41 keep_these_too="${sky_files} ${keep_these_too}"
43 lose_these_too="${sky_files} ${lose_these_too}"
46 # All files listed between the "Things-to-keep:" line and the
47 # "Files-to-sed:" line will be kept. All other files will be removed.
48 # Directories listed in this section will have their own Sanitize
49 # called. Directories not listed will be removed in their entirety
183 r5900_files="tc-mips.c"
185 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
186 for i in $r5900_files ; do
187 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Keeping r5900 stuff in $i
195 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
196 if [ -n "${verbose}" ] ; then
197 echo Removing traces of \"r5900\" from $i...
200 sed '/start\-sanitize\-r5900/,/end\-sanitize\-r5900/d' < $i > new
201 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
202 if [ -n "${verbose}" ] ; then
203 echo Caching $i in .Recover...
212 vr5400_files="tc-mips.c"
213 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
214 for i in $vr5400_files ; do
215 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
216 if [ -n "${verbose}" ] ; then
217 echo Keeping vr5400 stuff in $i
223 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
224 if [ -n "${verbose}" ] ; then
225 echo Removing traces of \"vr5400\" from $i...
228 sed '/start\-sanitize\-vr5400/,/end\-sanitize\-vr5400/d' < $i > new
229 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
230 if [ -n "${verbose}" ] ; then
231 echo Caching $i in .Recover...
240 tx19_files="tc-mips.c"
242 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
243 for i in $tx19_files ; do
244 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
245 if [ -n "${verbose}" ] ; then
246 echo Keeping tx19 stuff in $i
252 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
253 if [ -n "${verbose}" ] ; then
254 echo Removing traces of \"tx19\" from $i...
257 sed '/start\-sanitize\-tx19/,/end\-sanitize\-tx19/d' < $i > new
258 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
259 if [ -n "${verbose}" ] ; then
260 echo Caching $i in .Recover...
269 tx49_files="ChangeLog tc-mips.c"
271 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
272 for i in $tx49_files ; do
273 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
274 if [ -n "${verbose}" ] ; then
275 echo Keeping tx49 stuff in $i
281 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
282 if [ -n "${verbose}" ] ; then
283 echo Removing traces of \"tx49\" from $i...
286 sed '/start\-sanitize\-tx49/,/end\-sanitize\-tx49/d' < $i > new
287 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
288 if [ -n "${verbose}" ] ; then
289 echo Caching $i in .Recover...
298 tic80_files="obj-coff.h"
300 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
301 for i in $tic80_files ; do
302 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
303 if [ -n "${verbose}" ] ; then
304 echo Keeping tic80 stuff in $i
310 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
311 if [ -n "${verbose}" ] ; then
312 echo Removing traces of \"tic80\" from $i...
315 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
316 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
317 if [ -n "${verbose}" ] ; then
318 echo Caching $i in .Recover...
327 if [ -n "${verbose}" ] ; then
328 echo Processing \"sh4\"...
332 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
333 for i in $sh4_files ; do
334 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
335 if [ -n "${verbose}" ] ; then
336 echo Keeping sh4 stuff in $i
341 for i in $sh4_files ; do
342 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
343 if [ -n "${verbose}" ] ; then
344 echo Removing traces of \"sh4\" from $i...
347 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
348 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
349 if [ -n "${verbose}" ] ; then
350 echo Caching $i in .Recover...
359 v850e_files="tc-v850.c tc-v850.h"
360 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
361 for i in $v850e_files ; do
362 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
363 if [ -n "${verbose}" ] ; then
364 echo Keeping v850e stuff in $i
369 for i in $v850e_files ; do
370 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
371 if [ -n "${verbose}" ] ; then
372 echo Removing traces of \"v850e\" from $i...
375 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
376 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
377 if [ -n "${verbose}" ] ; then
378 echo Caching $i in .Recover...
387 m32rx_files="tc-m32r.c tc-m32r.h"
388 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
389 for i in $m32rx_files ; do
390 if test ! -d $i && (grep sanitize\-m32rx $i > /dev/null) ; then
391 if [ -n "${verbose}" ] ; then
392 echo Keeping m32rx stuff in $i
397 for i in $m32rx_files ; do
398 if test -r $i && (grep sanitize\-m32rx $i > /dev/null) ; then
399 if [ -n "${verbose}" ] ; then
400 echo Removing traces of \"m32rx\" from $i...
403 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
404 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
405 if [ -n "${verbose}" ] ; then
406 echo Caching $i in .Recover...
414 if ( echo $* | grep keep\-phase2\-m32rx > /dev/null ) ; then
415 for i in $m32rx_files ; do
416 if test ! -d $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
417 if [ -n "${verbose}" ] ; then
418 echo Keeping m32rx stuff in $i
423 for i in $m32rx_files ; do
424 if test -r $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
425 if [ -n "${verbose}" ] ; then
426 echo Removing traces of \"m32rx\" from $i...
429 sed '/start\-sanitize\-phase2\-m32rx/,/end\-sanitize\-phase2\-m32rx/d' < $i > new
430 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
431 if [ -n "${verbose}" ] ; then
432 echo Caching $i in .Recover...
441 vr4111_files="tc-mips.c"
442 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
443 for i in $vr4111_files ; do
444 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
445 if [ -n "${verbose}" ] ; then
446 echo Keeping vr4111 stuff in $i
451 for i in $vr4111_files ; do
452 if test -r $i && (grep sanitize-vr4111 $i > /dev/null) ; then
453 if [ -n "${verbose}" ] ; then
454 echo Removing traces of \"vr4111\" from $i...
457 sed '/start\-sanitize\-vr4111/,/end\-sanitize\-vr4111/d' < $i > new
458 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
459 if [ -n "${verbose}" ] ; then
460 echo Caching $i in .Recover...
470 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
471 echo '***' Some mentions of Sanitize are still left in $i! 1>&2