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 d30v_files="tc-d30v.c tc-d30v.h"
28 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
29 keep_these_too="${d30v_files} ${keep_these_too}"
31 lose_these_too="${d30v_files} ${lose_these_too}"
34 v850_files="tc-v850.c tc-v850.h"
36 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
37 keep_these_too="${v850_files} ${keep_these_too}"
39 lose_these_too="${v850_files} ${lose_these_too}"
42 tic80_files="tc-tic80.c tc-tic80.h"
44 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
45 keep_these_too="${tic80_files} ${keep_these_too}"
47 lose_these_too="${tic80_files} ${lose_these_too}"
50 # All files listed between the "Things-to-keep:" line and the
51 # "Files-to-sed:" line will be kept. All other files will be removed.
52 # Directories listed in this section will have their own Sanitize
53 # called. Directories not listed will be removed in their entirety
193 r5900_files="tc-mips.c"
195 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
196 for i in $r5900_files ; do
197 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
198 if [ -n "${verbose}" ] ; then
199 echo Keeping r5900 stuff in $i
205 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
206 if [ -n "${verbose}" ] ; then
207 echo Removing traces of \"r5900\" from $i...
210 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
211 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
212 if [ -n "${verbose}" ] ; then
213 echo Caching $i in .Recover...
222 tic80_files="obj-coff.h"
224 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
225 for i in $tic80_files ; do
226 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
227 if [ -n "${verbose}" ] ; then
228 echo Keeping tic80 stuff in $i
234 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
235 if [ -n "${verbose}" ] ; then
236 echo Removing traces of \"tic80\" from $i...
239 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
240 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
241 if [ -n "${verbose}" ] ; then
242 echo Caching $i in .Recover...