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 tx49_files="ChangeLog mips.h"
133 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
134 for i in $tx49_files ; do
135 if test -f $i && (grep sanitize-tx49 $i > /dev/null) ; then
136 if [ -n "${verbose}" ] ; then
137 echo Keeping tx49 stuff in $i
142 for i in $tx49_files ; do
143 if test -f $i && (grep sanitize-tx49 $i > /dev/null) ; then
144 if [ -n "${verbose}" ] ; then
145 echo Removing traces of \"tx49\" from $i...
148 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
149 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
150 if [ -n "${verbose}" ] ; then
151 echo Caching $i in .Recover...
160 r5900_files="ChangeLog mips.h"
161 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
162 for i in $r5900_files ; do
163 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
164 if [ -n "${verbose}" ] ; then
165 echo Keeping r5900 stuff in $i
170 for i in $r5900_files ; do
171 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
172 if [ -n "${verbose}" ] ; then
173 echo Removing traces of \"r5900\" from $i...
176 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
177 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
178 if [ -n "${verbose}" ] ; then
179 echo Caching $i in .Recover...
188 vr5400_files="ChangeLog mips.h"
189 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
190 for i in $vr5400_files ; do
191 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
192 if [ -n "${verbose}" ] ; then
193 echo Keeping vr5400 stuff in $i
198 for i in $vr5400_files ; do
199 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
200 if [ -n "${verbose}" ] ; then
201 echo Removing traces of \"vr5400\" from $i...
204 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
205 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
206 if [ -n "${verbose}" ] ; then
207 echo Caching $i in .Recover...
216 tic80_files="ChangeLog"
217 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
218 for i in $tic80_files ; do
219 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
220 if [ -n "${verbose}" ] ; then
221 echo Keeping tic80 stuff in $i
226 for i in $tic80_files ; do
227 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
228 if [ -n "${verbose}" ] ; then
229 echo Removing traces of \"tic80\" from $i...
232 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
233 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
234 if [ -n "${verbose}" ] ; then
235 echo Caching $i in .Recover...
244 coldfire_files="ChangeLog m68k.h"
245 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
246 for i in $coldfire_files ; do
247 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
248 if [ -n "${verbose}" ] ; then
249 echo Keeping coldfire stuff in $i
254 for i in $coldfire_files ; do
255 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
256 if [ -n "${verbose}" ] ; then
257 echo Removing traces of \"coldfire\" from $i...
260 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
261 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
262 if [ -n "${verbose}" ] ; then
263 echo Caching $i in .Recover...
274 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
275 echo '***' Some mentions of Sanitize are still left in $i! 1>&2