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 # 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 sky_files="txvu-tdep.c"
79 if ( echo $* | grep keep\-sky > /dev/null ) ; then
80 keep_these_too="${sky_files} ${keep_these_too}"
81 if [ -n "${verbose}" ] ; then
82 echo Keeping ${sky_files}
85 lose_these_too="${sky_files} ${lose_these_too}"
86 if [ -n "${verbose}" ] ; then
87 echo Deleting ${sky_files}
91 java_files="jv-exp.y jv-lang.c jv-lang.h jv-typeprint.c jv-valprint.c"
93 if ( echo $* | grep keep\-java > /dev/null ) ; then
94 keep_these_too="${java_files} ${keep_these_too}"
95 if [ -n "${verbose}" ] ; then
96 echo Keeping ${java_files}
99 lose_these_too="${java_files} ${lose_these_too}"
100 if [ -n "${verbose}" ] ; then
101 echo Deleting ${java_files}
105 vr4111_files="nec4102rom.c"
107 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
108 keep_these_too="${vr4111_files} ${keep_these_too}"
109 if [ -n "${verbose}" ] ; then
110 echo Keeping ${vr4111_files}
113 lose_these_too="${vr4111_files} ${lose_these_too}"
114 if [ -n "${verbose}" ] ; then
115 echo Deleting ${vr4111_files}
119 # All files listed between the "Things-to-keep:" line and the
120 # "Files-to-sed:" line will be kept. All other files will be removed.
121 # Directories listed in this section will have their own Sanitize
122 # called. Directories not listed will be removed in their entirety
476 # Things which are explicitly *not* kept, for now.
485 # Don't try to clean directories here, as the 'mv' command will fail.
486 # Also, grep fails on NFS mounted directories.
487 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
488 echo Catering to RMS by removing traces of \"gdbtk\"...
490 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
491 echo Removing traces of \"gdbtk\" out of $i...
493 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
494 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
495 echo Caching $i in .Recover...
502 echo Leaving \"gdbtk\" in the sources...
504 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
505 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
507 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
508 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
509 echo Caching $i in .Recover...
517 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
519 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
520 if [ -n "${verbose}" ] ; then
521 echo Keeping v850e stuff in $i
527 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
528 if [ -n "${verbose}" ] ; then
529 echo Removing traces of \"v850e\" from $i...
532 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
533 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
534 if [ -n "${verbose}" ] ; then
535 echo Caching $i in .Recover...
544 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
546 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
547 if [ -n "${verbose}" ] ; then
548 echo Keeping vr4320 stuff in $i
554 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
555 if [ -n "${verbose}" ] ; then
556 echo Removing traces of \"vr4320\" from $i...
559 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
560 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
561 if [ -n "${verbose}" ] ; then
562 echo Caching $i in .Recover...
571 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
573 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
574 if [ -n "${verbose}" ] ; then
575 echo Keeping r5900 stuff in $i
581 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
582 if [ -n "${verbose}" ] ; then
583 echo Removing traces of \"r5900\" from $i...
586 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
587 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
588 if [ -n "${verbose}" ] ; then
589 echo Caching $i in .Recover...
598 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
600 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
601 if [ -n "${verbose}" ] ; then
602 echo Keeping tx19 stuff in $i
608 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
609 if [ -n "${verbose}" ] ; then
610 echo Removing traces of \"tx19\" from $i...
613 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
614 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
615 if [ -n "${verbose}" ] ; then
616 echo Caching $i in .Recover...
625 if ( echo $* | grep keep\-tx39 > /dev/null ) ; then
627 if test ! -d $i && (grep sanitize-tx39 $i > /dev/null) ; then
628 if [ -n "${verbose}" ] ; then
629 echo Keeping tx39 stuff in $i
635 if test ! -d $i && (grep sanitize-tx39 $i > /dev/null) ; then
636 if [ -n "${verbose}" ] ; then
637 echo Removing traces of \"tx39\" from $i...
640 sed '/start\-sanitize\-tx39/,/end-\sanitize\-tx39/d' < $i > new
641 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
642 if [ -n "${verbose}" ] ; then
643 echo Caching $i in .Recover...
652 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
654 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
655 if [ -n "${verbose}" ] ; then
656 echo Keeping tx49 stuff in $i
662 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
663 if [ -n "${verbose}" ] ; then
664 echo Removing traces of \"tx49\" from $i...
667 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
668 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
669 if [ -n "${verbose}" ] ; then
670 echo Caching $i in .Recover...
679 if ( echo $* | grep keep\-sky > /dev/null ) ; then
681 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
682 if [ -n "${verbose}" ] ; then
683 echo Keeping sky stuff in $i
689 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
690 if [ -n "${verbose}" ] ; then
691 echo Removing traces of \"sky\" from $i...
694 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
695 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
696 if [ -n "${verbose}" ] ; then
697 echo Caching $i in .Recover...
706 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
708 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
709 if [ -n "${verbose}" ] ; then
710 echo Keeping vr5400 stuff in $i
716 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
717 if [ -n "${verbose}" ] ; then
718 echo Removing traces of \"vr5400\" from $i...
721 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
722 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
723 if [ -n "${verbose}" ] ; then
724 echo Caching $i in .Recover...
733 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
735 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
736 if [ -n "${verbose}" ] ; then
737 echo Keeping tic80 stuff in $i
743 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
744 if [ -n "${verbose}" ] ; then
745 echo Removing traces of \"tic80\" from $i...
748 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
749 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
750 if [ -n "${verbose}" ] ; then
751 echo Caching $i in .Recover...
760 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
762 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
763 if [ -n "${verbose}" ] ; then
764 echo Keeping am33 stuff in $i
770 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
771 if [ -n "${verbose}" ] ; then
772 echo Removing traces of \"am33\" from $i...
775 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
776 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
777 if [ -n "${verbose}" ] ; then
778 echo Caching $i in .Recover...
787 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
789 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
790 if [ -n "${verbose}" ] ; then
791 echo Keeping d30v stuff in $i
797 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
798 if [ -n "${verbose}" ] ; then
799 echo Removing traces of \"d30v\" from $i...
802 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
803 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
804 if [ -n "${verbose}" ] ; then
805 echo Caching $i in .Recover...
814 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
816 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
817 if [ -n "${verbose}" ] ; then
818 echo Keeping vr4111 stuff in $i
824 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
825 if [ -n "${verbose}" ] ; then
826 echo Removing traces of \"vr4111\" from $i...
829 sed '/start\-sanitize\-vr4111/,/end-\sanitize\-vr4111/d' < $i > new
830 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
831 if [ -n "${verbose}" ] ; then
832 echo Caching $i in .Recover...
841 if ( echo $* | grep keep\-ide > /dev/null ) ; then
843 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
844 if [ -n "${verbose}" ] ; then
845 echo Keeping ide stuff in $i
851 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
852 if [ -n "${verbose}" ] ; then
853 echo Removing traces of \"ide\" from $i...
856 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
857 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
858 if [ -n "${verbose}" ] ; then
859 echo Caching $i in .Recover...
868 # This is a temporary measure to sanitize out references to the
869 # startup code need by the TclPro debugger. When that goes out
870 # of alpha, we can remove this.
872 if ( echo $* | grep keep\-tclpro > /dev/null ) ; then
874 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
875 echo Keeping \"tclpro\" stuff in $i, but editing out sanitize lines...
877 sed -e '/start\-sanitize\-tclpro/d' -e '/end\-sanitize\-tclpro/d' < $i > new
878 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
879 echo Caching $i in .Recover...
887 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
888 if [ -n "${verbose}" ] ; then
889 echo Removing traces of \"tclpro\" from $i...
892 sed '/start\-sanitize\-tclpro/,/end-\sanitize\-tclpro/d' < $i > new
893 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
894 if [ -n "${verbose}" ] ; then
895 echo Caching $i in .Recover...
904 if ( echo $* | grep keep\-mswin > /dev/null ) ; then
906 if test ! -d $i && (grep sanitize-mswin $i > /dev/null) ; then
907 if [ -n "${verbose}" ] ; then
908 echo Keeping mswin stuff in $i
914 if test ! -d $i && (grep sanitize-mswin $i > /dev/null) ; then
915 if [ -n "${verbose}" ] ; then
916 echo Removing traces of \"mswin\" from $i...
919 sed '/start\-sanitize\-mswin/,/end-\sanitize\-mswin/d' < $i > new
920 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
921 if [ -n "${verbose}" ] ; then
922 echo Caching $i in .Recover...
931 if ( echo $* | grep keep\-java > /dev/null ) ; then
933 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
934 if [ -n "${verbose}" ] ; then
935 echo Keeping java stuff in $i
941 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
942 if [ -n "${verbose}" ] ; then
943 echo Removing traces of \"java\" from $i...
946 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
947 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
948 if [ -n "${verbose}" ] ; then
949 echo Caching $i in .Recover...
959 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
960 echo '***' Some mentions of Sanitize are still left in $i! 1>&2