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}"
36 if ( echo $* | grep keep\-sky > /dev/null ) ; then
37 keep_these_too="${sky_files} ${keep_these_too}"
39 lose_these_too="${sky_files} ${lose_these_too}"
42 # All files listed between the "Things-to-keep:" line and the
43 # "Files-to-sed:" line will be kept. All other files will be removed.
44 # Directories listed in this section will have their own Sanitize
45 # called. Directories not listed will be removed in their entirety
82 d30v_files="ChangeLog"
83 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
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 Keeping d30v stuff in $i
92 for i in $d30v_files ; do
93 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
94 if [ -n "${verbose}" ] ; then
95 echo Removing traces of \"d30v\" from $i...
98 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
99 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
100 if [ -n "${verbose}" ] ; then
101 echo Caching $i in .Recover...
110 v850e_files="ChangeLog v850.h"
112 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
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 Keeping v850e stuff in $i
121 for i in $v850e_files ; do
122 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
123 if [ -n "${verbose}" ] ; then
124 echo Removing traces of \"v850e\" from $i...
127 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
128 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
129 if [ -n "${verbose}" ] ; then
130 echo Caching $i in .Recover...
139 tx49_files="ChangeLog mips.h"
141 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
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 Keeping tx49 stuff in $i
150 for i in $tx49_files ; do
151 if test -f $i && (grep sanitize-tx49 $i > /dev/null) ; then
152 if [ -n "${verbose}" ] ; then
153 echo Removing traces of \"tx49\" from $i...
156 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
157 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
158 if [ -n "${verbose}" ] ; then
159 echo Caching $i in .Recover...
168 r5900_files="ChangeLog mips.h"
169 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
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 Keeping r5900 stuff in $i
178 for i in $r5900_files ; do
179 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
180 if [ -n "${verbose}" ] ; then
181 echo Removing traces of \"r5900\" from $i...
184 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
185 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
186 if [ -n "${verbose}" ] ; then
187 echo Caching $i in .Recover...
196 vr5400_files="ChangeLog mips.h"
197 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
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 Keeping vr5400 stuff in $i
206 for i in $vr5400_files ; do
207 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
208 if [ -n "${verbose}" ] ; then
209 echo Removing traces of \"vr5400\" from $i...
212 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
213 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
214 if [ -n "${verbose}" ] ; then
215 echo Caching $i in .Recover...
224 tic80_files="ChangeLog"
225 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
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 Keeping tic80 stuff in $i
234 for i in $tic80_files ; do
235 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
236 if [ -n "${verbose}" ] ; then
237 echo Removing traces of \"tic80\" from $i...
240 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
241 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
242 if [ -n "${verbose}" ] ; then
243 echo Caching $i in .Recover...
252 sky_files="ChangeLog"
253 if ( echo $* | grep keep\-sky > /dev/null ) ; then
254 for i in $sky_files ; do
255 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
256 if [ -n "${verbose}" ] ; then
257 echo Keeping sky stuff in $i
262 for i in $sky_files ; do
263 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
264 if [ -n "${verbose}" ] ; then
265 echo Removing traces of \"sky\" from $i...
268 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
269 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
270 if [ -n "${verbose}" ] ; then
271 echo Caching $i in .Recover...
280 coldfire_files="ChangeLog m68k.h"
281 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
282 for i in $coldfire_files ; do
283 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
284 if [ -n "${verbose}" ] ; then
285 echo Keeping coldfire stuff in $i
290 for i in $coldfire_files ; do
291 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
292 if [ -n "${verbose}" ] ; then
293 echo Removing traces of \"coldfire\" from $i...
296 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
297 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
298 if [ -n "${verbose}" ] ; then
299 echo Caching $i in .Recover...
310 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
311 echo '***' Some mentions of Sanitize are still left in $i! 1>&2