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
18 arc_files="tc-arc.c tc-arc.h"
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
23 lose_these_too="${arc_files} ${lose_these_too}"
26 d10v_files="tc-d10v.c tc-d10v.h"
28 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
29 keep_these_too="${d10v_files} ${keep_these_too}"
31 lose_these_too="${d10v_files} ${lose_these_too}"
34 d30v_files="tc-d30v.c tc-d30v.h"
36 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
37 keep_these_too="${d30v_files} ${keep_these_too}"
39 lose_these_too="${d30v_files} ${lose_these_too}"
42 v850_files="tc-v850.c tc-v850.h"
44 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
45 keep_these_too="${v850_files} ${keep_these_too}"
47 lose_these_too="${v850_files} ${lose_these_too}"
50 tic80_files="tc-tic80.c tc-tic80.h"
52 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
53 keep_these_too="${tic80_files} ${keep_these_too}"
55 lose_these_too="${tic80_files} ${lose_these_too}"
58 # All files listed between the "Things-to-keep:" line and the
59 # "Files-to-sed:" line will be kept. All other files will be removed.
60 # Directories listed in this section will have their own Sanitize
61 # called. Directories not listed will be removed in their entirety
199 r5900_files="tc-mips.c"
201 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
202 for i in $r5900_files ; do
203 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
204 if [ -n "${verbose}" ] ; then
205 echo Keeping r5900 stuff in $i
211 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
212 if [ -n "${verbose}" ] ; then
213 echo Removing traces of \"r5900\" from $i...
216 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
217 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
218 if [ -n "${verbose}" ] ; then
219 echo Caching $i in .Recover...
228 tic80_files="obj-coff.h"
230 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
231 for i in $tic80_files ; do
232 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
233 if [ -n "${verbose}" ] ; then
234 echo Keeping tic80 stuff in $i
240 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
241 if [ -n "${verbose}" ] ; then
242 echo Removing traces of \"tic80\" from $i...
245 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
246 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
247 if [ -n "${verbose}" ] ; then
248 echo Caching $i in .Recover...