1 # .Sanitize for devo/include/opcode.
3 # Each directory to survive it's 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
20 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
21 keep_these_too="${d30v_files} ${keep_these_too}"
23 lose_these_too="${d30v_files} ${lose_these_too}"
28 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
29 keep_these_too="${tic80_files} ${keep_these_too}"
31 lose_these_too="${tic80_files} ${lose_these_too}"
34 # All files listed between the "Things-to-keep:" line and the
35 # "Files-to-sed:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
74 d30v_files="ChangeLog"
75 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
76 for i in $d30v_files ; do
77 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
78 if [ -n "${verbose}" ] ; then
79 echo Keeping d30v stuff in $i
84 for i in $d30v_files ; do
85 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
86 if [ -n "${verbose}" ] ; then
87 echo Removing traces of \"d30v\" from $i...
90 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
91 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
92 if [ -n "${verbose}" ] ; then
93 echo Caching $i in .Recover...
102 v850e_files="ChangeLog v850.h"
104 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
105 for i in $v850e_files ; do
106 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
107 if [ -n "${verbose}" ] ; then
108 echo Keeping v850e stuff in $i
113 for i in $v850e_files ; do
114 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
115 if [ -n "${verbose}" ] ; then
116 echo Removing traces of \"v850e\" from $i...
119 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
120 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
121 if [ -n "${verbose}" ] ; then
122 echo Caching $i in .Recover...
131 r5900_files="ChangeLog mips.h"
132 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
133 for i in $r5900_files ; do
134 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
135 if [ -n "${verbose}" ] ; then
136 echo Keeping r5900 stuff in $i
141 for i in $r5900_files ; do
142 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
143 if [ -n "${verbose}" ] ; then
144 echo Removing traces of \"r5900\" from $i...
147 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
148 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
149 if [ -n "${verbose}" ] ; then
150 echo Caching $i in .Recover...
159 tic80_files="ChangeLog"
160 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
161 for i in $tic80_files ; do
162 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
163 if [ -n "${verbose}" ] ; then
164 echo Keeping tic80 stuff in $i
169 for i in $tic80_files ; do
170 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
171 if [ -n "${verbose}" ] ; then
172 echo Removing traces of \"tic80\" from $i...
175 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
176 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
177 if [ -n "${verbose}" ] ; then
178 echo Caching $i in .Recover...
187 coldfire_files="ChangeLog m68k.h"
188 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
189 for i in $coldfire_files ; do
190 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
191 if [ -n "${verbose}" ] ; then
192 echo Keeping coldfire stuff in $i
197 for i in $coldfire_files ; do
198 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
199 if [ -n "${verbose}" ] ; then
200 echo Removing traces of \"coldfire\" from $i...
203 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
204 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
205 if [ -n "${verbose}" ] ; then
206 echo Caching $i in .Recover...
217 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
218 echo '***' Some mentions of Sanitize are still left in $i! 1>&2