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 tic80_files="tc-tic80.c tc-tic80.h"
36 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
37 keep_these_too="${tic80_files} ${keep_these_too}"
39 lose_these_too="${tic80_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
177 r5900_files="tc-mips.c"
179 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
180 for i in $r5900_files ; do
181 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
182 if [ -n "${verbose}" ] ; then
183 echo Keeping r5900 stuff in $i
189 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
190 if [ -n "${verbose}" ] ; then
191 echo Removing traces of \"r5900\" from $i...
194 sed '/start\-sanitize\-r5900/,/end\-sanitize\-r5900/d' < $i > new
195 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
196 if [ -n "${verbose}" ] ; then
197 echo Caching $i in .Recover...
206 tic80_files="obj-coff.h"
208 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
209 for i in $tic80_files ; do
210 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
211 if [ -n "${verbose}" ] ; then
212 echo Keeping tic80 stuff in $i
218 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
219 if [ -n "${verbose}" ] ; then
220 echo Removing traces of \"tic80\" from $i...
223 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
224 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
225 if [ -n "${verbose}" ] ; then
226 echo Caching $i in .Recover...
235 if [ -n "${verbose}" ] ; then
236 echo Processing \"sh4\"...
240 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
241 for i in $sh4_files ; do
242 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
243 if [ -n "${verbose}" ] ; then
244 echo Keeping sh4 stuff in $i
249 for i in $sh4_files ; do
250 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
251 if [ -n "${verbose}" ] ; then
252 echo Removing traces of \"sh4\" from $i...
255 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
256 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
257 if [ -n "${verbose}" ] ; then
258 echo Caching $i in .Recover...
267 v850e_files="tc-v850.c tc-v850.h"
268 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
269 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
270 for i in $v850e_files ; do
271 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
272 if [ -n "${verbose}" ] ; then
273 echo Keeping v850e and v850eq stuff in $i
278 for i in $v850e_files ; do
279 if test -r $i && (grep sanitize-v850eq $i > /dev/null) ; then
280 if [ -n "${verbose}" ] ; then
281 echo Removing traces of \"v850eq\" from $i...
284 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
285 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
286 if [ -n "${verbose}" ] ; then
287 echo Caching $i in .Recover...
296 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
297 for i in $v850e_files ; do
298 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
299 if [ -n "${verbose}" ] ; then
300 echo Keeping v850e and v850eq stuff in $i
305 for i in $v850e_files ; do
306 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
307 if [ -n "${verbose}" ] ; then
308 echo Removing traces of \"v850e\" from $i...
311 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
312 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
313 if [ -n "${verbose}" ] ; then
314 echo Caching $i in .Recover...
320 if test -r $i && (grep sanitize-v850eq $i > /dev/null) ; then
321 if [ -n "${verbose}" ] ; then
322 echo Removing traces of \"v850eq\" from $i...
325 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
326 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
327 if [ -n "${verbose}" ] ; then
328 echo Caching $i in .Recover...