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 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 java_files="jv-exp.y jv-lang.c jv-lang.h jv-typeprint.c jv-valprint.c"
76 if ( echo $* | grep keep\-java > /dev/null ) ; then
77 keep_these_too="${java_files} ${keep_these_too}"
78 if [ -n "${verbose}" ] ; then
79 echo Keeping ${java_files}
82 lose_these_too="${java_files} ${lose_these_too}"
83 if [ -n "${verbose}" ] ; then
84 echo Deleting ${java_files}
88 vr4111_files="nec4102rom.c"
90 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
91 keep_these_too="${vr4111_files} ${keep_these_too}"
92 if [ -n "${verbose}" ] ; then
93 echo Keeping ${vr4111_files}
96 lose_these_too="${vr4111_files} ${lose_these_too}"
97 if [ -n "${verbose}" ] ; then
98 echo Deleting ${vr4111_files}
102 carp_files="carp-tdep.c"
104 if ( echo $* | grep keep\-carp > /dev/null ) ; then
105 keep_these_too="${carp_files} ${keep_these_too}"
106 if [ -n "${verbose}" ] ; then
107 echo Keeping ${carp_files}
110 lose_these_too="${carp_files} ${lose_these_too}"
111 if [ -n "${verbose}" ] ; then
112 echo Deleting ${carp_files}
116 # All files listed between the "Things-to-keep:" line and the
117 # "Files-to-sed:" line will be kept. All other files will be removed.
118 # Directories listed in this section will have their own Sanitize
119 # called. Directories not listed will be removed in their entirety
484 # Things which are explicitly *not* kept, for now.
494 # Don't try to clean directories here, as the 'mv' command will fail.
495 # Also, grep fails on NFS mounted directories.
496 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
497 echo Catering to RMS by removing traces of \"gdbtk\"...
499 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
500 echo Removing traces of \"gdbtk\" out of $i...
502 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
503 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
504 echo Caching $i in .Recover...
511 echo Leaving \"gdbtk\" in the sources...
513 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
514 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
516 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
517 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
518 echo Caching $i in .Recover...
526 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
528 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
529 if [ -n "${verbose}" ] ; then
530 echo Keeping v850e stuff in $i
536 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
537 if [ -n "${verbose}" ] ; then
538 echo Removing traces of \"v850e\" from $i...
541 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
542 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
543 if [ -n "${verbose}" ] ; then
544 echo Caching $i in .Recover...
553 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
555 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
556 if [ -n "${verbose}" ] ; then
557 echo Keeping vr4xxx stuff in $i
563 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
564 if [ -n "${verbose}" ] ; then
565 echo Removing traces of \"vr4xxx\" from $i...
568 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
569 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
570 if [ -n "${verbose}" ] ; then
571 echo Caching $i in .Recover...
580 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
582 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
583 if [ -n "${verbose}" ] ; then
584 echo Keeping vr4320 stuff in $i
590 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
591 if [ -n "${verbose}" ] ; then
592 echo Removing traces of \"vr4320\" from $i...
595 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
596 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
597 if [ -n "${verbose}" ] ; then
598 echo Caching $i in .Recover...
607 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
609 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
610 if [ -n "${verbose}" ] ; then
611 echo Keeping r5900 stuff in $i
617 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
618 if [ -n "${verbose}" ] ; then
619 echo Removing traces of \"r5900\" from $i...
622 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
623 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
624 if [ -n "${verbose}" ] ; then
625 echo Caching $i in .Recover...
634 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
636 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
637 if [ -n "${verbose}" ] ; then
638 echo Keeping tx19 stuff in $i
644 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
645 if [ -n "${verbose}" ] ; then
646 echo Removing traces of \"tx19\" from $i...
649 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
650 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
651 if [ -n "${verbose}" ] ; then
652 echo Caching $i in .Recover...
661 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
663 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
664 if [ -n "${verbose}" ] ; then
665 echo Keeping tx49 stuff in $i
671 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
672 if [ -n "${verbose}" ] ; then
673 echo Removing traces of \"tx49\" from $i...
676 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
677 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
678 if [ -n "${verbose}" ] ; then
679 echo Caching $i in .Recover...
688 if ( echo $* | grep keep\-sky > /dev/null ) ; then
690 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
691 if [ -n "${verbose}" ] ; then
692 echo Keeping sky stuff in $i
698 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
699 if [ -n "${verbose}" ] ; then
700 echo Removing traces of \"sky\" from $i...
703 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
704 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
705 if [ -n "${verbose}" ] ; then
706 echo Caching $i in .Recover...
715 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
717 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
718 if [ -n "${verbose}" ] ; then
719 echo Keeping cygnus stuff in $i
725 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
726 if [ -n "${verbose}" ] ; then
727 echo Removing traces of \"cygnus\" from $i...
730 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
731 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
732 if [ -n "${verbose}" ] ; then
733 echo Caching $i in .Recover...
742 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
744 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
745 if [ -n "${verbose}" ] ; then
746 echo Keeping tic80 stuff in $i
752 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
753 if [ -n "${verbose}" ] ; then
754 echo Removing traces of \"tic80\" from $i...
757 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
758 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
759 if [ -n "${verbose}" ] ; then
760 echo Caching $i in .Recover...
769 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
771 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
772 if [ -n "${verbose}" ] ; then
773 echo Keeping am33 stuff in $i
779 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
780 if [ -n "${verbose}" ] ; then
781 echo Removing traces of \"am33\" from $i...
784 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
785 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
786 if [ -n "${verbose}" ] ; then
787 echo Caching $i in .Recover...
796 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
798 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
799 if [ -n "${verbose}" ] ; then
800 echo Keeping vr4111 stuff in $i
806 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
807 if [ -n "${verbose}" ] ; then
808 echo Removing traces of \"vr4111\" from $i...
811 sed '/start\-sanitize\-vr4111/,/end-\sanitize\-vr4111/d' < $i > new
812 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
813 if [ -n "${verbose}" ] ; then
814 echo Caching $i in .Recover...
823 if ( echo $* | grep keep\-ide > /dev/null ) ; then
825 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
826 if [ -n "${verbose}" ] ; then
827 echo Keeping ide stuff in $i
833 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
834 if [ -n "${verbose}" ] ; then
835 echo Removing traces of \"ide\" from $i...
838 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
839 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
840 if [ -n "${verbose}" ] ; then
841 echo Caching $i in .Recover...
850 if ( echo $* | grep keep\-kod > /dev/null ) ; then
852 if test ! -d $i && (grep sanitize-kod $i > /dev/null) ; then
853 if [ -n "${verbose}" ] ; then
854 echo Keeping kod stuff in $i
860 if test ! -d $i && (grep sanitize-kod $i > /dev/null) ; then
861 if [ -n "${verbose}" ] ; then
862 echo Removing traces of \"kod\" from $i...
865 sed '/start\-sanitize\-kod/,/end-\sanitize\-kod/d' < $i > new
866 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
867 if [ -n "${verbose}" ] ; then
868 echo Caching $i in .Recover...
877 # This is a temporary measure to sanitize out references to the
878 # startup code need by the TclPro debugger. When that goes out
879 # of alpha, we can remove this.
881 if ( echo $* | grep keep\-tclpro > /dev/null ) ; then
883 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
884 echo Keeping \"tclpro\" stuff in $i, but editing out sanitize lines...
886 sed -e '/start\-sanitize\-tclpro/d' -e '/end\-sanitize\-tclpro/d' < $i > new
887 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
888 echo Caching $i in .Recover...
896 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
897 if [ -n "${verbose}" ] ; then
898 echo Removing traces of \"tclpro\" from $i...
901 sed '/start\-sanitize\-tclpro/,/end-\sanitize\-tclpro/d' < $i > new
902 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
903 if [ -n "${verbose}" ] ; then
904 echo Caching $i in .Recover...
913 if ( echo $* | grep keep\-java > /dev/null ) ; then
915 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
916 if [ -n "${verbose}" ] ; then
917 echo Keeping java stuff in $i
923 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
924 if [ -n "${verbose}" ] ; then
925 echo Removing traces of \"java\" from $i...
928 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
929 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
930 if [ -n "${verbose}" ] ; then
931 echo Caching $i in .Recover...
940 if ( echo $* | grep keep\-carp > /dev/null ) ; then
942 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
943 if [ -n "${verbose}" ] ; then
944 echo Keeping carp stuff in $i
950 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
951 if [ -n "${verbose}" ] ; then
952 echo Removing traces of \"carp\" from $i...
955 sed '/start\-sanitize\-carp/,/end-\sanitize\-carp/d' < $i > new
956 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
957 if [ -n "${verbose}" ] ; then
958 echo Caching $i in .Recover...
968 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
969 echo '***' Some mentions of Sanitize are still left in $i! 1>&2