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 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
40 keep_these_too="${v850_files} ${keep_these_too}"
42 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
43 keep_these_too="${v850_files} ${keep_these_too}"
45 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
191 r5900_files="tc-mips.c"
193 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
194 for i in $r5900_files ; do
195 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
196 if [ -n "${verbose}" ] ; then
197 echo Keeping r5900 stuff in $i
203 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
204 if [ -n "${verbose}" ] ; then
205 echo Removing traces of \"r5900\" from $i...
208 sed '/start\-sanitize\-r5900/,/end\-sanitize\-r5900/d' < $i > new
209 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
210 if [ -n "${verbose}" ] ; then
211 echo Caching $i in .Recover...
220 tic80_files="obj-coff.h"
222 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
223 for i in $tic80_files ; do
224 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
225 if [ -n "${verbose}" ] ; then
226 echo Keeping tic80 stuff in $i
232 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
233 if [ -n "${verbose}" ] ; then
234 echo Removing traces of \"tic80\" from $i...
237 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
238 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
239 if [ -n "${verbose}" ] ; then
240 echo Caching $i in .Recover...
249 v850e_files="tc-v850.c tc-v850.h"
250 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
251 for i in $v850e_files ; do
252 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
253 if [ -n "${verbose}" ] ; then
254 echo Removing traces of \"v850eq\" from $i...
257 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
258 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
259 if [ -n "${verbose}" ] ; then
260 echo Caching $i in .Recover...
268 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
269 for i in $v850e_files ; do
270 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
271 if [ -n "${verbose}" ] ; then
272 echo Keeping v850e and v850eq stuff in $i
277 for i in $v850e_files ; do
278 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
279 if [ -n "${verbose}" ] ; then
280 echo Removing traces of \"v850e\" from $i...
283 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
285 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < new > newer
286 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
287 if [ -n "${verbose}" ] ; then
288 echo Caching $i in .Recover...