1 # .Sanitize for devo/gas/config
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
19 lose_these_too="vms ${lose_these_too}"
22 d30v_files="tc-d30v.c tc-d30v.h"
24 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
25 keep_these_too="${d30v_files} ${keep_these_too}"
27 lose_these_too="${d30v_files} ${lose_these_too}"
30 tic80_files="tc-tic80.c tc-tic80.h"
32 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
33 keep_these_too="${tic80_files} ${keep_these_too}"
35 lose_these_too="${tic80_files} ${lose_these_too}"
38 # All files listed between the "Things-to-keep:" line and the
39 # "Files-to-sed:" line will be kept. All other files will be removed.
40 # Directories listed in this section will have their own Sanitize
41 # called. Directories not listed will be removed in their entirety
175 r5900_files="tc-mips.c"
177 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
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 Keeping r5900 stuff in $i
187 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Removing traces of \"r5900\" from $i...
192 sed '/start\-sanitize\-r5900/,/end\-sanitize\-r5900/d' < $i > new
193 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
194 if [ -n "${verbose}" ] ; then
195 echo Caching $i in .Recover...
204 tx19_files="tc-mips.c"
206 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
207 for i in $tx19_files ; do
208 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
209 if [ -n "${verbose}" ] ; then
210 echo Keeping tx19 stuff in $i
216 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
217 if [ -n "${verbose}" ] ; then
218 echo Removing traces of \"tx19\" from $i...
221 sed '/start\-sanitize\-tx19/,/end\-sanitize\-tx19/d' < $i > new
222 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
223 if [ -n "${verbose}" ] ; then
224 echo Caching $i in .Recover...
233 tic80_files="obj-coff.h"
235 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
236 for i in $tic80_files ; do
237 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
238 if [ -n "${verbose}" ] ; then
239 echo Keeping tic80 stuff in $i
245 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
246 if [ -n "${verbose}" ] ; then
247 echo Removing traces of \"tic80\" from $i...
250 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
251 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
252 if [ -n "${verbose}" ] ; then
253 echo Caching $i in .Recover...
262 if [ -n "${verbose}" ] ; then
263 echo Processing \"sh4\"...
267 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
268 for i in $sh4_files ; do
269 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
270 if [ -n "${verbose}" ] ; then
271 echo Keeping sh4 stuff in $i
276 for i in $sh4_files ; do
277 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
278 if [ -n "${verbose}" ] ; then
279 echo Removing traces of \"sh4\" from $i...
282 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
283 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
284 if [ -n "${verbose}" ] ; then
285 echo Caching $i in .Recover...
294 v850e_files="tc-v850.c tc-v850.h"
295 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
296 for i in $v850e_files ; do
297 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
298 if [ -n "${verbose}" ] ; then
299 echo Keeping v850e stuff in $i
304 for i in $v850e_files ; do
305 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
306 if [ -n "${verbose}" ] ; then
307 echo Removing traces of \"v850e\" from $i...
310 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
311 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
312 if [ -n "${verbose}" ] ; then
313 echo Caching $i in .Recover...