1 # .Sanitize for devo/gdb.
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 gdbtk_files="README.GDBTK gdbtk.c gdbtcl gdbtcl2 gdbtk.tcl"
20 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
21 lose_these_too="${gdbtk_files} ${lose_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Deleting ${gdbtk_files}
26 keep_these_too="${gdbtk_files} ${keep_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Keeping ${gdbtk_files}
32 # WinGDB files are not really ready to be part of FSF releases, but
33 # keep them for progressives and such.
37 if ( echo $* | grep lose\-mswin > /dev/null ) ; then
38 lose_these_too="${mswin_files} ${lose_these_too}"
39 if [ -n "${verbose}" ] ; then
40 echo Deleting ${mswin_files}
43 keep_these_too="${mswin_files} ${keep_these_too}"
44 if [ -n "${verbose}" ] ; then
45 echo Keeping ${mswin_files}
49 tic80_files="tic80-tdep.c"
51 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
52 keep_these_too="${tic80_files} ${keep_these_too}"
53 if [ -n "${verbose}" ] ; then
54 echo Keeping ${tic80_files}
57 lose_these_too="${tic80_files} ${lose_these_too}"
58 if [ -n "${verbose}" ] ; then
59 echo Deleting ${tic80_files}
63 d30v_files="d30v-tdep.c"
65 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
66 keep_these_too="${d30v_files} ${keep_these_too}"
67 if [ -n "${verbose}" ] ; then
68 echo Keeping ${d30v_files}
71 lose_these_too="${d30v_files} ${lose_these_too}"
72 if [ -n "${verbose}" ] ; then
73 echo Deleting ${d30v_files}
77 # All files listed between the "Things-to-keep:" line and the
78 # "Files-to-sed:" line will be kept. All other files will be removed.
79 # Directories listed in this section will have their own Sanitize
80 # called. Directories not listed will be removed in their entirety
427 # Things which are explicitly *not* kept, for now.
437 # Don't try to clean directories here, as the 'mv' command will fail.
438 # Also, grep fails on NFS mounted directories.
439 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
440 echo Catering to RMS by removing traces of \"gdbtk\"...
442 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
443 echo Removing traces of \"gdbtk\" out of $i...
445 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
446 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
447 echo Caching $i in .Recover...
454 echo Leaving \"gdbtk\" in the sources...
456 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
457 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
459 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
460 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
461 echo Caching $i in .Recover...
469 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
471 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
472 if [ -n "${verbose}" ] ; then
473 echo Keeping v850e stuff in $i
479 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
480 if [ -n "${verbose}" ] ; then
481 echo Removing traces of \"v850e\" from $i...
484 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
485 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
486 if [ -n "${verbose}" ] ; then
487 echo Caching $i in .Recover...
496 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
498 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
499 if [ -n "${verbose}" ] ; then
500 echo Keeping sh4 stuff in $i
506 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
507 if [ -n "${verbose}" ] ; then
508 echo Removing traces of \"sh4\" from $i...
511 sed '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' < $i > new
512 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
513 if [ -n "${verbose}" ] ; then
514 echo Caching $i in .Recover...
523 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
525 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
526 if [ -n "${verbose}" ] ; then
527 echo Keeping r5900 stuff in $i
533 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
534 if [ -n "${verbose}" ] ; then
535 echo Removing traces of \"r5900\" from $i...
538 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
539 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
540 if [ -n "${verbose}" ] ; then
541 echo Caching $i in .Recover...
550 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
552 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
553 if [ -n "${verbose}" ] ; then
554 echo Keeping tx19 stuff in $i
560 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
561 if [ -n "${verbose}" ] ; then
562 echo Removing traces of \"tx19\" from $i...
565 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
566 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
567 if [ -n "${verbose}" ] ; then
568 echo Caching $i in .Recover...
577 if ( echo $* | grep keep\-tx39 > /dev/null ) ; then
579 if test ! -d $i && (grep sanitize-tx39 $i > /dev/null) ; then
580 if [ -n "${verbose}" ] ; then
581 echo Keeping tx39 stuff in $i
587 if test ! -d $i && (grep sanitize-tx39 $i > /dev/null) ; then
588 if [ -n "${verbose}" ] ; then
589 echo Removing traces of \"tx39\" from $i...
592 sed '/start\-sanitize\-tx39/,/end-\sanitize\-tx39/d' < $i > new
593 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
594 if [ -n "${verbose}" ] ; then
595 echo Caching $i in .Recover...
604 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
606 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
607 if [ -n "${verbose}" ] ; then
608 echo Keeping tx49 stuff in $i
614 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
615 if [ -n "${verbose}" ] ; then
616 echo Removing traces of \"tx49\" from $i...
619 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
620 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
621 if [ -n "${verbose}" ] ; then
622 echo Caching $i in .Recover...
631 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
633 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
634 if [ -n "${verbose}" ] ; then
635 echo Keeping vr5400 stuff in $i
641 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
642 if [ -n "${verbose}" ] ; then
643 echo Removing traces of \"vr5400\" from $i...
646 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
647 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
648 if [ -n "${verbose}" ] ; then
649 echo Caching $i in .Recover...
658 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
660 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
661 if [ -n "${verbose}" ] ; then
662 echo Keeping tic80 stuff in $i
668 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
669 if [ -n "${verbose}" ] ; then
670 echo Removing traces of \"tic80\" from $i...
673 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
674 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
675 if [ -n "${verbose}" ] ; then
676 echo Caching $i in .Recover...
685 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
687 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
688 if [ -n "${verbose}" ] ; then
689 echo Keeping d30v stuff in $i
695 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
696 if [ -n "${verbose}" ] ; then
697 echo Removing traces of \"d30v\" from $i...
700 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
701 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
702 if [ -n "${verbose}" ] ; then
703 echo Caching $i in .Recover...
713 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
714 echo '***' Some mentions of Sanitize are still left in $i! 1>&2