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
485 # Things which are explicitly *not* kept, for now.
495 # Don't try to clean directories here, as the 'mv' command will fail.
496 # Also, grep fails on NFS mounted directories.
497 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
498 echo Catering to RMS by removing traces of \"gdbtk\"...
500 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
501 echo Removing traces of \"gdbtk\" out of $i...
503 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
504 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
505 echo Caching $i in .Recover...
512 echo Leaving \"gdbtk\" in the sources...
514 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
515 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
517 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
518 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
519 echo Caching $i in .Recover...
527 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
529 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
530 if [ -n "${verbose}" ] ; then
531 echo Keeping v850e stuff in $i
537 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
538 if [ -n "${verbose}" ] ; then
539 echo Removing traces of \"v850e\" from $i...
542 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
543 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
544 if [ -n "${verbose}" ] ; then
545 echo Caching $i in .Recover...
554 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
556 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
557 if [ -n "${verbose}" ] ; then
558 echo Keeping vr4xxx stuff in $i
564 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
565 if [ -n "${verbose}" ] ; then
566 echo Removing traces of \"vr4xxx\" from $i...
569 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
570 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
571 if [ -n "${verbose}" ] ; then
572 echo Caching $i in .Recover...
581 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
583 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
584 if [ -n "${verbose}" ] ; then
585 echo Keeping vr4320 stuff in $i
591 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
592 if [ -n "${verbose}" ] ; then
593 echo Removing traces of \"vr4320\" from $i...
596 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
597 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
598 if [ -n "${verbose}" ] ; then
599 echo Caching $i in .Recover...
608 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
610 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
611 if [ -n "${verbose}" ] ; then
612 echo Keeping r5900 stuff in $i
618 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
619 if [ -n "${verbose}" ] ; then
620 echo Removing traces of \"r5900\" from $i...
623 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
624 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
625 if [ -n "${verbose}" ] ; then
626 echo Caching $i in .Recover...
635 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
637 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
638 if [ -n "${verbose}" ] ; then
639 echo Keeping tx19 stuff in $i
645 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
646 if [ -n "${verbose}" ] ; then
647 echo Removing traces of \"tx19\" from $i...
650 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
651 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
652 if [ -n "${verbose}" ] ; then
653 echo Caching $i in .Recover...
662 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
664 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
665 if [ -n "${verbose}" ] ; then
666 echo Keeping tx49 stuff in $i
672 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
673 if [ -n "${verbose}" ] ; then
674 echo Removing traces of \"tx49\" from $i...
677 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
678 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
679 if [ -n "${verbose}" ] ; then
680 echo Caching $i in .Recover...
689 if ( echo $* | grep keep\-sky > /dev/null ) ; then
691 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
692 if [ -n "${verbose}" ] ; then
693 echo Keeping sky stuff in $i
699 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
700 if [ -n "${verbose}" ] ; then
701 echo Removing traces of \"sky\" from $i...
704 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
705 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
706 if [ -n "${verbose}" ] ; then
707 echo Caching $i in .Recover...
716 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
718 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
719 if [ -n "${verbose}" ] ; then
720 echo Keeping cygnus stuff in $i
726 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
727 if [ -n "${verbose}" ] ; then
728 echo Removing traces of \"cygnus\" from $i...
731 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
732 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
733 if [ -n "${verbose}" ] ; then
734 echo Caching $i in .Recover...
743 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
745 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
746 if [ -n "${verbose}" ] ; then
747 echo Keeping tic80 stuff in $i
753 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
754 if [ -n "${verbose}" ] ; then
755 echo Removing traces of \"tic80\" from $i...
758 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
759 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
760 if [ -n "${verbose}" ] ; then
761 echo Caching $i in .Recover...
770 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
772 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
773 if [ -n "${verbose}" ] ; then
774 echo Keeping am33 stuff in $i
780 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
781 if [ -n "${verbose}" ] ; then
782 echo Removing traces of \"am33\" from $i...
785 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
786 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
787 if [ -n "${verbose}" ] ; then
788 echo Caching $i in .Recover...
797 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
799 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
800 if [ -n "${verbose}" ] ; then
801 echo Keeping vr4111 stuff in $i
807 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
808 if [ -n "${verbose}" ] ; then
809 echo Removing traces of \"vr4111\" from $i...
812 sed '/start\-sanitize\-vr4111/,/end-\sanitize\-vr4111/d' < $i > new
813 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
814 if [ -n "${verbose}" ] ; then
815 echo Caching $i in .Recover...
824 if ( echo $* | grep keep\-ide > /dev/null ) ; then
826 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
827 if [ -n "${verbose}" ] ; then
828 echo Keeping ide stuff in $i
834 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
835 if [ -n "${verbose}" ] ; then
836 echo Removing traces of \"ide\" from $i...
839 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
840 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
841 if [ -n "${verbose}" ] ; then
842 echo Caching $i in .Recover...
851 if ( echo $* | grep keep\-kod > /dev/null ) ; then
853 if test ! -d $i && (grep sanitize-kod $i > /dev/null) ; then
854 if [ -n "${verbose}" ] ; then
855 echo Keeping kod stuff in $i
861 if test ! -d $i && (grep sanitize-kod $i > /dev/null) ; then
862 if [ -n "${verbose}" ] ; then
863 echo Removing traces of \"kod\" from $i...
866 sed '/start\-sanitize\-kod/,/end-\sanitize\-kod/d' < $i > new
867 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
868 if [ -n "${verbose}" ] ; then
869 echo Caching $i in .Recover...
878 # This is a temporary measure to sanitize out references to the
879 # startup code need by the TclPro debugger. When that goes out
880 # of alpha, we can remove this.
882 if ( echo $* | grep keep\-tclpro > /dev/null ) ; then
884 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
885 echo Keeping \"tclpro\" stuff in $i, but editing out sanitize lines...
887 sed -e '/start\-sanitize\-tclpro/d' -e '/end\-sanitize\-tclpro/d' < $i > new
888 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
889 echo Caching $i in .Recover...
897 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
898 if [ -n "${verbose}" ] ; then
899 echo Removing traces of \"tclpro\" from $i...
902 sed '/start\-sanitize\-tclpro/,/end-\sanitize\-tclpro/d' < $i > new
903 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
904 if [ -n "${verbose}" ] ; then
905 echo Caching $i in .Recover...
914 if ( echo $* | grep keep\-java > /dev/null ) ; then
916 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
917 if [ -n "${verbose}" ] ; then
918 echo Keeping java stuff in $i
924 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
925 if [ -n "${verbose}" ] ; then
926 echo Removing traces of \"java\" from $i...
929 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
930 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
931 if [ -n "${verbose}" ] ; then
932 echo Caching $i in .Recover...
941 if ( echo $* | grep keep\-carp > /dev/null ) ; then
943 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
944 if [ -n "${verbose}" ] ; then
945 echo Keeping carp stuff in $i
951 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
952 if [ -n "${verbose}" ] ; then
953 echo Removing traces of \"carp\" from $i...
956 sed '/start\-sanitize\-carp/,/end-\sanitize\-carp/d' < $i > new
957 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
958 if [ -n "${verbose}" ] ; then
959 echo Caching $i in .Recover...
969 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
970 echo '***' Some mentions of Sanitize are still left in $i! 1>&2