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="ChangeLog-gdbtk README.GDBTK gdbtk.c gdbtk.h gdbtk-cmds.c gdbtk-hooks.c gdbtk-wrapper.c gdbtk-wrapper.h gdbtk-variable.c gdbtcl2 gdb.rc gdbtool.ico"
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 #kod_files="kod.c kodecosdll.c"
34 #if ( echo $* | grep keep\-kod > /dev/null ) ; then
35 # keep_these_too="${kod_files} ${keep_these_too}"
36 # if [ -n "${verbose}" ] ; then
37 # echo Keeping ${kod_files}
40 # lose_these_too="${kod_files} ${lose_these_too}"
41 # if [ -n "${verbose}" ] ; then
42 # echo Deleting ${kod_files}
46 tic80_files="tic80-tdep.c"
48 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
49 keep_these_too="${tic80_files} ${keep_these_too}"
50 if [ -n "${verbose}" ] ; then
51 echo Keeping ${tic80_files}
54 lose_these_too="${tic80_files} ${lose_these_too}"
55 if [ -n "${verbose}" ] ; then
56 echo Deleting ${tic80_files}
60 sky_files="txvu-tdep.c"
62 if ( echo $* | grep keep\-sky > /dev/null ) ; then
63 keep_these_too="${sky_files} ${keep_these_too}"
64 if [ -n "${verbose}" ] ; then
65 echo Keeping ${sky_files}
68 lose_these_too="${sky_files} ${lose_these_too}"
69 if [ -n "${verbose}" ] ; then
70 echo Deleting ${sky_files}
74 vr4xxx_files="nec4102rom.c"
76 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
77 keep_these_too="${vr4xxx_files} ${keep_these_too}"
78 if [ -n "${verbose}" ] ; then
79 echo Keeping ${vr4xxx_files}
82 lose_these_too="${vr4xxx_files} ${lose_these_too}"
83 if [ -n "${verbose}" ] ; then
84 echo Deleting ${vr4xxx_files}
88 carp_files="carp-tdep.c"
90 if ( echo $* | grep keep\-carp > /dev/null ) ; then
91 keep_these_too="${carp_files} ${keep_these_too}"
92 if [ -n "${verbose}" ] ; then
93 echo Keeping ${carp_files}
96 lose_these_too="${carp_files} ${lose_these_too}"
97 if [ -n "${verbose}" ] ; then
98 echo Deleting ${carp_files}
102 # All files listed between the "Things-to-keep:" line and the
103 # "Files-to-sed:" line will be kept. All other files will be removed.
104 # Directories listed in this section will have their own Sanitize
105 # called. Directories not listed will be removed in their entirety
471 # Things which are explicitly *not* kept, for now.
481 # Don't try to clean directories here, as the 'mv' command will fail.
482 # Also, grep fails on NFS mounted directories.
483 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
484 echo Catering to RMS by removing traces of \"gdbtk\"...
486 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
487 echo Removing traces of \"gdbtk\" out of $i...
489 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
490 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
491 echo Caching $i in .Recover...
498 echo Leaving \"gdbtk\" in the sources...
500 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
501 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
503 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
504 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
505 echo Caching $i in .Recover...
513 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
515 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
516 if [ -n "${verbose}" ] ; then
517 echo Keeping vr4xxx stuff in $i
523 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
524 if [ -n "${verbose}" ] ; then
525 echo Removing traces of \"vr4xxx\" from $i...
528 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
529 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
530 if [ -n "${verbose}" ] ; then
531 echo Caching $i in .Recover...
540 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
542 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
543 if [ -n "${verbose}" ] ; then
544 echo Keeping vr4320 stuff in $i
550 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
551 if [ -n "${verbose}" ] ; then
552 echo Removing traces of \"vr4320\" from $i...
555 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
556 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
557 if [ -n "${verbose}" ] ; then
558 echo Caching $i in .Recover...
567 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
569 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
570 if [ -n "${verbose}" ] ; then
571 echo Keeping r5900 stuff in $i
577 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
578 if [ -n "${verbose}" ] ; then
579 echo Removing traces of \"r5900\" from $i...
582 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
583 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
584 if [ -n "${verbose}" ] ; then
585 echo Caching $i in .Recover...
594 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
596 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
597 if [ -n "${verbose}" ] ; then
598 echo Keeping tx19 stuff in $i
604 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
605 if [ -n "${verbose}" ] ; then
606 echo Removing traces of \"tx19\" from $i...
609 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
610 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
611 if [ -n "${verbose}" ] ; then
612 echo Caching $i in .Recover...
621 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
623 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
624 if [ -n "${verbose}" ] ; then
625 echo Keeping tx49 stuff in $i
631 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
632 if [ -n "${verbose}" ] ; then
633 echo Removing traces of \"tx49\" from $i...
636 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
637 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
638 if [ -n "${verbose}" ] ; then
639 echo Caching $i in .Recover...
648 if ( echo $* | grep keep\-sky > /dev/null ) ; then
650 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
651 if [ -n "${verbose}" ] ; then
652 echo Keeping sky stuff in $i
658 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
659 if [ -n "${verbose}" ] ; then
660 echo Removing traces of \"sky\" from $i...
663 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
664 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
665 if [ -n "${verbose}" ] ; then
666 echo Caching $i in .Recover...
675 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
677 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
678 if [ -n "${verbose}" ] ; then
679 echo Keeping cygnus stuff in $i
685 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
686 if [ -n "${verbose}" ] ; then
687 echo Removing traces of \"cygnus\" from $i...
690 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
691 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
692 if [ -n "${verbose}" ] ; then
693 echo Caching $i in .Recover...
702 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
704 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
705 if [ -n "${verbose}" ] ; then
706 echo Keeping tic80 stuff in $i
712 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
713 if [ -n "${verbose}" ] ; then
714 echo Removing traces of \"tic80\" from $i...
717 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
718 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
719 if [ -n "${verbose}" ] ; then
720 echo Caching $i in .Recover...
729 if ( echo $* | grep keep\-ide > /dev/null ) ; then
731 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
732 if [ -n "${verbose}" ] ; then
733 echo Keeping ide stuff in $i
739 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
740 if [ -n "${verbose}" ] ; then
741 echo Removing traces of \"ide\" from $i...
744 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
745 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
746 if [ -n "${verbose}" ] ; then
747 echo Caching $i in .Recover...
756 #if ( echo $* | grep keep\-kod > /dev/null ) ; then
758 # if test ! -d $i && (grep sanitize-kod $i > /dev/null) ; then
759 # if [ -n "${verbose}" ] ; then
760 # echo Keeping kod stuff in $i
766 # if test ! -d $i && (grep sanitize-kod $i > /dev/null) ; then
767 # if [ -n "${verbose}" ] ; then
768 # echo Removing traces of \"kod\" from $i...
771 # sed '/start\-sanitize\-kod/,/end-\sanitize\-kod/d' < $i > new
772 # if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
773 # if [ -n "${verbose}" ] ; then
774 # echo Caching $i in .Recover...
783 # This is a temporary measure to sanitize out references to the
784 # startup code need by the TclPro debugger. When that goes out
785 # of alpha, we can remove this.
787 if ( echo $* | grep keep\-tclpro > /dev/null ) ; then
789 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
790 echo Keeping \"tclpro\" stuff in $i, but editing out sanitize lines...
792 sed -e '/start\-sanitize\-tclpro/d' -e '/end\-sanitize\-tclpro/d' < $i > new
793 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
794 echo Caching $i in .Recover...
802 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
803 if [ -n "${verbose}" ] ; then
804 echo Removing traces of \"tclpro\" from $i...
807 sed '/start\-sanitize\-tclpro/,/end-\sanitize\-tclpro/d' < $i > new
808 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
809 if [ -n "${verbose}" ] ; then
810 echo Caching $i in .Recover...
819 if ( echo $* | grep keep\-carp > /dev/null ) ; then
821 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
822 if [ -n "${verbose}" ] ; then
823 echo Keeping carp stuff in $i
829 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
830 if [ -n "${verbose}" ] ; then
831 echo Removing traces of \"carp\" from $i...
834 sed '/start\-sanitize\-carp/,/end-\sanitize\-carp/d' < $i > new
835 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
836 if [ -n "${verbose}" ] ; then
837 echo Caching $i in .Recover...
847 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
848 echo '***' Some mentions of Sanitize are still left in $i! 1>&2