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
460 # Things which are explicitly *not* kept, for now.
469 # Don't try to clean directories here, as the 'mv' command will fail.
470 # Also, grep fails on NFS mounted directories.
471 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
472 echo Catering to RMS by removing traces of \"gdbtk\"...
474 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
475 echo Removing traces of \"gdbtk\" out of $i...
477 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
478 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
479 echo Caching $i in .Recover...
486 echo Leaving \"gdbtk\" in the sources...
488 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
489 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
491 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
492 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
493 echo Caching $i in .Recover...
501 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
503 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
504 if [ -n "${verbose}" ] ; then
505 echo Keeping v850e stuff in $i
511 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
512 if [ -n "${verbose}" ] ; then
513 echo Removing traces of \"v850e\" from $i...
516 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
517 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
518 if [ -n "${verbose}" ] ; then
519 echo Caching $i in .Recover...
528 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
530 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
531 if [ -n "${verbose}" ] ; then
532 echo Keeping vr4320 stuff in $i
538 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
539 if [ -n "${verbose}" ] ; then
540 echo Removing traces of \"vr4320\" from $i...
543 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
544 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
545 if [ -n "${verbose}" ] ; then
546 echo Caching $i in .Recover...
555 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
557 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
558 if [ -n "${verbose}" ] ; then
559 echo Keeping r5900 stuff in $i
565 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
566 if [ -n "${verbose}" ] ; then
567 echo Removing traces of \"r5900\" from $i...
570 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
571 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
572 if [ -n "${verbose}" ] ; then
573 echo Caching $i in .Recover...
582 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
584 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
585 if [ -n "${verbose}" ] ; then
586 echo Keeping tx19 stuff in $i
592 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
593 if [ -n "${verbose}" ] ; then
594 echo Removing traces of \"tx19\" from $i...
597 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
598 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
599 if [ -n "${verbose}" ] ; then
600 echo Caching $i in .Recover...
609 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
611 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
612 if [ -n "${verbose}" ] ; then
613 echo Keeping tx49 stuff in $i
619 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
620 if [ -n "${verbose}" ] ; then
621 echo Removing traces of \"tx49\" from $i...
624 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
625 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
626 if [ -n "${verbose}" ] ; then
627 echo Caching $i in .Recover...
636 if ( echo $* | grep keep\-sky > /dev/null ) ; then
638 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
639 if [ -n "${verbose}" ] ; then
640 echo Keeping sky stuff in $i
646 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
647 if [ -n "${verbose}" ] ; then
648 echo Removing traces of \"sky\" from $i...
651 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
652 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
653 if [ -n "${verbose}" ] ; then
654 echo Caching $i in .Recover...
663 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
665 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
666 if [ -n "${verbose}" ] ; then
667 echo Keeping cygnus stuff in $i
673 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
674 if [ -n "${verbose}" ] ; then
675 echo Removing traces of \"cygnus\" from $i...
678 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
679 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
680 if [ -n "${verbose}" ] ; then
681 echo Caching $i in .Recover...
690 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
692 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
693 if [ -n "${verbose}" ] ; then
694 echo Keeping tic80 stuff in $i
700 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
701 if [ -n "${verbose}" ] ; then
702 echo Removing traces of \"tic80\" from $i...
705 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
706 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
707 if [ -n "${verbose}" ] ; then
708 echo Caching $i in .Recover...
717 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
719 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
720 if [ -n "${verbose}" ] ; then
721 echo Keeping am33 stuff in $i
727 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
728 if [ -n "${verbose}" ] ; then
729 echo Removing traces of \"am33\" from $i...
732 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
733 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
734 if [ -n "${verbose}" ] ; then
735 echo Caching $i in .Recover...
744 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
746 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
747 if [ -n "${verbose}" ] ; then
748 echo Keeping vr4111 stuff in $i
754 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
755 if [ -n "${verbose}" ] ; then
756 echo Removing traces of \"vr4111\" from $i...
759 sed '/start\-sanitize\-vr4111/,/end-\sanitize\-vr4111/d' < $i > new
760 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
761 if [ -n "${verbose}" ] ; then
762 echo Caching $i in .Recover...
771 if ( echo $* | grep keep\-ide > /dev/null ) ; then
773 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
774 if [ -n "${verbose}" ] ; then
775 echo Keeping ide stuff in $i
781 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
782 if [ -n "${verbose}" ] ; then
783 echo Removing traces of \"ide\" from $i...
786 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
787 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
788 if [ -n "${verbose}" ] ; then
789 echo Caching $i in .Recover...
798 # This is a temporary measure to sanitize out references to the
799 # startup code need by the TclPro debugger. When that goes out
800 # of alpha, we can remove this.
802 if ( echo $* | grep keep\-tclpro > /dev/null ) ; then
804 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
805 echo Keeping \"tclpro\" stuff in $i, but editing out sanitize lines...
807 sed -e '/start\-sanitize\-tclpro/d' -e '/end\-sanitize\-tclpro/d' < $i > new
808 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
809 echo Caching $i in .Recover...
817 if test ! -d $i && (grep sanitize-tclpro $i > /dev/null) ; then
818 if [ -n "${verbose}" ] ; then
819 echo Removing traces of \"tclpro\" from $i...
822 sed '/start\-sanitize\-tclpro/,/end-\sanitize\-tclpro/d' < $i > new
823 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
824 if [ -n "${verbose}" ] ; then
825 echo Caching $i in .Recover...
834 if ( echo $* | grep keep\-java > /dev/null ) ; then
836 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
837 if [ -n "${verbose}" ] ; then
838 echo Keeping java stuff in $i
844 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
845 if [ -n "${verbose}" ] ; then
846 echo Removing traces of \"java\" from $i...
849 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
850 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
851 if [ -n "${verbose}" ] ; then
852 echo Caching $i in .Recover...
861 if ( echo $* | grep keep\-carp > /dev/null ) ; then
863 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
864 if [ -n "${verbose}" ] ; then
865 echo Keeping carp stuff in $i
871 if test ! -d $i && (grep sanitize-carp $i > /dev/null) ; then
872 if [ -n "${verbose}" ] ; then
873 echo Removing traces of \"carp\" from $i...
876 sed '/start\-sanitize\-carp/,/end-\sanitize\-carp/d' < $i > new
877 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
878 if [ -n "${verbose}" ] ; then
879 echo Caching $i in .Recover...
889 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
890 echo '***' Some mentions of Sanitize are still left in $i! 1>&2