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 tic80_files="tic80-tdep.c"
34 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
35 keep_these_too="${tic80_files} ${keep_these_too}"
36 if [ -n "${verbose}" ] ; then
37 echo Keeping ${tic80_files}
40 lose_these_too="${tic80_files} ${lose_these_too}"
41 if [ -n "${verbose}" ] ; then
42 echo Deleting ${tic80_files}
46 sky_files="txvu-tdep.c"
48 if ( echo $* | grep keep\-sky > /dev/null ) ; then
49 keep_these_too="${sky_files} ${keep_these_too}"
50 if [ -n "${verbose}" ] ; then
51 echo Keeping ${sky_files}
54 lose_these_too="${sky_files} ${lose_these_too}"
55 if [ -n "${verbose}" ] ; then
56 echo Deleting ${sky_files}
60 java_files="jv-exp.y jv-lang.c jv-lang.h jv-typeprint.c jv-valprint.c"
62 if ( echo $* | grep keep\-java > /dev/null ) ; then
63 keep_these_too="${java_files} ${keep_these_too}"
64 if [ -n "${verbose}" ] ; then
65 echo Keeping ${java_files}
68 lose_these_too="${java_files} ${lose_these_too}"
69 if [ -n "${verbose}" ] ; then
70 echo Deleting ${java_files}
74 vr4111_files="nec4102rom.c"
76 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
77 keep_these_too="${vr4111_files} ${keep_these_too}"
78 if [ -n "${verbose}" ] ; then
79 echo Keeping ${vr4111_files}
82 lose_these_too="${vr4111_files} ${lose_these_too}"
83 if [ -n "${verbose}" ] ; then
84 echo Deleting ${vr4111_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
464 # Things which are explicitly *not* kept, for now.
474 # Don't try to clean directories here, as the 'mv' command will fail.
475 # Also, grep fails on NFS mounted directories.
476 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
477 echo Catering to RMS by removing traces of \"gdbtk\"...
479 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
480 echo Removing traces of \"gdbtk\" out of $i...
482 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
483 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
484 echo Caching $i in .Recover...
491 echo Leaving \"gdbtk\" in the sources...
493 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
494 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
496 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
497 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
498 echo Caching $i in .Recover...
506 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
508 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
509 if [ -n "${verbose}" ] ; then
510 echo Keeping v850e stuff in $i
516 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
517 if [ -n "${verbose}" ] ; then
518 echo Removing traces of \"v850e\" from $i...
521 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
522 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
523 if [ -n "${verbose}" ] ; then
524 echo Caching $i in .Recover...
533 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
535 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
536 if [ -n "${verbose}" ] ; then
537 echo Keeping vr4xxx stuff in $i
543 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
544 if [ -n "${verbose}" ] ; then
545 echo Removing traces of \"vr4xxx\" from $i...
548 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
549 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
550 if [ -n "${verbose}" ] ; then
551 echo Caching $i in .Recover...
560 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
562 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
563 if [ -n "${verbose}" ] ; then
564 echo Keeping vr4320 stuff in $i
570 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
571 if [ -n "${verbose}" ] ; then
572 echo Removing traces of \"vr4320\" from $i...
575 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
576 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
577 if [ -n "${verbose}" ] ; then
578 echo Caching $i in .Recover...
587 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
589 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
590 if [ -n "${verbose}" ] ; then
591 echo Keeping r5900 stuff in $i
597 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
598 if [ -n "${verbose}" ] ; then
599 echo Removing traces of \"r5900\" from $i...
602 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
603 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
604 if [ -n "${verbose}" ] ; then
605 echo Caching $i in .Recover...
614 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
616 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
617 if [ -n "${verbose}" ] ; then
618 echo Keeping tx19 stuff in $i
624 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
625 if [ -n "${verbose}" ] ; then
626 echo Removing traces of \"tx19\" from $i...
629 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
630 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
631 if [ -n "${verbose}" ] ; then
632 echo Caching $i in .Recover...
641 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
643 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
644 if [ -n "${verbose}" ] ; then
645 echo Keeping tx49 stuff in $i
651 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
652 if [ -n "${verbose}" ] ; then
653 echo Removing traces of \"tx49\" from $i...
656 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
657 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
658 if [ -n "${verbose}" ] ; then
659 echo Caching $i in .Recover...
668 if ( echo $* | grep keep\-sky > /dev/null ) ; then
670 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
671 if [ -n "${verbose}" ] ; then
672 echo Keeping sky stuff in $i
678 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
679 if [ -n "${verbose}" ] ; then
680 echo Removing traces of \"sky\" from $i...
683 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
684 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
685 if [ -n "${verbose}" ] ; then
686 echo Caching $i in .Recover...
695 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
697 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
698 if [ -n "${verbose}" ] ; then
699 echo Keeping cygnus stuff in $i
705 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
706 if [ -n "${verbose}" ] ; then
707 echo Removing traces of \"cygnus\" from $i...
710 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
711 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
712 if [ -n "${verbose}" ] ; then
713 echo Caching $i in .Recover...
722 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
724 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
725 if [ -n "${verbose}" ] ; then
726 echo Keeping tic80 stuff in $i
732 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
733 if [ -n "${verbose}" ] ; then
734 echo Removing traces of \"tic80\" from $i...
737 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
738 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
739 if [ -n "${verbose}" ] ; then
740 echo Caching $i in .Recover...
749 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
751 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
752 if [ -n "${verbose}" ] ; then
753 echo Keeping am33 stuff in $i
759 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
760 if [ -n "${verbose}" ] ; then
761 echo Removing traces of \"am33\" from $i...
764 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
765 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
766 if [ -n "${verbose}" ] ; then
767 echo Caching $i in .Recover...
776 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
778 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
779 if [ -n "${verbose}" ] ; then
780 echo Keeping vr4111 stuff in $i
786 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
787 if [ -n "${verbose}" ] ; then
788 echo Removing traces of \"vr4111\" from $i...
791 sed '/start\-sanitize\-vr4111/,/end-\sanitize\-vr4111/d' < $i > new
792 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
793 if [ -n "${verbose}" ] ; then
794 echo Caching $i in .Recover...
803 if ( echo $* | grep keep\-ide > /dev/null ) ; then
805 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
806 if [ -n "${verbose}" ] ; then
807 echo Keeping ide stuff in $i
813 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
814 if [ -n "${verbose}" ] ; then
815 echo Removing traces of \"ide\" from $i...
818 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
819 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
820 if [ -n "${verbose}" ] ; then
821 echo Caching $i in .Recover...
830 # This is a temporary measure to sanitize out references to the
831 # startup code need by the TclPro debugger. When that goes out
832 # of alpha, we can remove this.
834 if ( echo $* | grep keep\-tclpro > /dev/null ) ; then
836 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
837 echo Keeping \"tclpro\" stuff in $i, but editing out sanitize lines...
839 sed -e '/start\-sanitize\-tclpro/d' -e '/end\-sanitize\-tclpro/d' < $i > new
840 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
841 echo Caching $i in .Recover...
849 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
850 if [ -n "${verbose}" ] ; then
851 echo Removing traces of \"tclpro\" from $i...
854 sed '/start\-sanitize\-tclpro/,/end-\sanitize\-tclpro/d' < $i > new
855 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
856 if [ -n "${verbose}" ] ; then
857 echo Caching $i in .Recover...
866 if ( echo $* | grep keep\-java > /dev/null ) ; then
868 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
869 if [ -n "${verbose}" ] ; then
870 echo Keeping java stuff in $i
876 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
877 if [ -n "${verbose}" ] ; then
878 echo Removing traces of \"java\" from $i...
881 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
882 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
883 if [ -n "${verbose}" ] ; then
884 echo Caching $i in .Recover...
893 if ( echo $* | grep keep\-carp > /dev/null ) ; then
895 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
896 if [ -n "${verbose}" ] ; then
897 echo Keeping carp stuff in $i
903 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
904 if [ -n "${verbose}" ] ; then
905 echo Removing traces of \"carp\" from $i...
908 sed '/start\-sanitize\-carp/,/end-\sanitize\-carp/d' < $i > new
909 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
910 if [ -n "${verbose}" ] ; then
911 echo Caching $i in .Recover...
921 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
922 echo '***' Some mentions of Sanitize are still left in $i! 1>&2