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 sky_files="tc-dvp.c tc-dvp.h"
40 if ( echo $* | grep keep\-sky > /dev/null ) ; then
41 keep_these_too="${sky_files} ${keep_these_too}"
43 lose_these_too="${sky_files} ${lose_these_too}"
46 # All files listed between the "Things-to-keep:" line and the
47 # "Files-to-sed:" line will be kept. All other files will be removed.
48 # Directories listed in this section will have their own Sanitize
49 # called. Directories not listed will be removed in their entirety
185 r5900_files="tc-mips.c"
187 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
188 for i in $r5900_files ; do
189 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
190 if [ -n "${verbose}" ] ; then
191 echo Keeping r5900 stuff in $i
197 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
198 if [ -n "${verbose}" ] ; then
199 echo Removing traces of \"r5900\" from $i...
202 sed '/start\-sanitize\-r5900/,/end\-sanitize\-r5900/d' < $i > new
203 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
204 if [ -n "${verbose}" ] ; then
205 echo Caching $i in .Recover...
214 vr5400_files="tc-mips.c"
215 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
216 for i in $vr5400_files ; do
217 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
218 if [ -n "${verbose}" ] ; then
219 echo Keeping vr5400 stuff in $i
225 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
226 if [ -n "${verbose}" ] ; then
227 echo Removing traces of \"vr5400\" from $i...
230 sed '/start\-sanitize\-vr5400/,/end\-sanitize\-vr5400/d' < $i > new
231 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
232 if [ -n "${verbose}" ] ; then
233 echo Caching $i in .Recover...
242 tx19_files="tc-mips.c"
244 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
245 for i in $tx19_files ; do
246 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
247 if [ -n "${verbose}" ] ; then
248 echo Keeping tx19 stuff in $i
254 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
255 if [ -n "${verbose}" ] ; then
256 echo Removing traces of \"tx19\" from $i...
259 sed '/start\-sanitize\-tx19/,/end\-sanitize\-tx19/d' < $i > new
260 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
261 if [ -n "${verbose}" ] ; then
262 echo Caching $i in .Recover...
271 tx49_files="ChangeLog tc-mips.c"
273 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
274 for i in $tx49_files ; do
275 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
276 if [ -n "${verbose}" ] ; then
277 echo Keeping tx49 stuff in $i
283 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
284 if [ -n "${verbose}" ] ; then
285 echo Removing traces of \"tx49\" from $i...
288 sed '/start\-sanitize\-tx49/,/end\-sanitize\-tx49/d' < $i > new
289 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
290 if [ -n "${verbose}" ] ; then
291 echo Caching $i in .Recover...
300 tic80_files="obj-coff.h"
302 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
303 for i in $tic80_files ; do
304 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
305 if [ -n "${verbose}" ] ; then
306 echo Keeping tic80 stuff in $i
312 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
313 if [ -n "${verbose}" ] ; then
314 echo Removing traces of \"tic80\" from $i...
317 sed '/start\-sanitize\-tic80/,/end\-sanitize\-tic80/d' < $i > new
318 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
319 if [ -n "${verbose}" ] ; then
320 echo Caching $i in .Recover...
329 v850e_files="tc-v850.c tc-v850.h"
330 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
331 for i in $v850e_files ; do
332 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
333 if [ -n "${verbose}" ] ; then
334 echo Keeping v850e stuff in $i
339 for i in $v850e_files ; do
340 if test -r $i && (grep sanitize-v850e $i > /dev/null) ; then
341 if [ -n "${verbose}" ] ; then
342 echo Removing traces of \"v850e\" from $i...
345 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
346 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
347 if [ -n "${verbose}" ] ; then
348 echo Caching $i in .Recover...
357 m32rx_files="tc-m32r.c tc-m32r.h"
358 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
359 for i in $m32rx_files ; do
360 if test ! -d $i && (grep sanitize\-m32rx $i > /dev/null) ; then
361 if [ -n "${verbose}" ] ; then
362 echo Keeping m32rx stuff in $i
367 for i in $m32rx_files ; do
368 if test -r $i && (grep sanitize\-m32rx $i > /dev/null) ; then
369 if [ -n "${verbose}" ] ; then
370 echo Removing traces of \"m32rx\" from $i...
373 sed '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' < $i > new
374 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
375 if [ -n "${verbose}" ] ; then
376 echo Caching $i in .Recover...
384 if ( echo $* | grep keep\-phase2\-m32rx > /dev/null ) ; then
385 for i in $m32rx_files ; do
386 if test ! -d $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
387 if [ -n "${verbose}" ] ; then
388 echo Keeping m32rx stuff in $i
393 for i in $m32rx_files ; do
394 if test -r $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
395 if [ -n "${verbose}" ] ; then
396 echo Removing traces of \"m32rx\" from $i...
399 sed '/start\-sanitize\-phase2\-m32rx/,/end\-sanitize\-phase2\-m32rx/d' < $i > new
400 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
401 if [ -n "${verbose}" ] ; then
402 echo Caching $i in .Recover...
411 vr4320_files="tc-mips.c"
412 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
413 for i in $vr4320_files ; do
414 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
415 if [ -n "${verbose}" ] ; then
416 echo Keeping vr4320 stuff in $i
421 for i in $vr4320_files ; do
422 if test -r $i && (grep sanitize-vr4320 $i > /dev/null) ; then
423 if [ -n "${verbose}" ] ; then
424 echo Removing traces of \"vr4320\" from $i...
427 sed '/start\-sanitize\-vr4320/,/end\-sanitize\-vr4320/d' < $i > new
428 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
429 if [ -n "${verbose}" ] ; then
430 echo Caching $i in .Recover...
440 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
441 echo '***' Some mentions of Sanitize are still left in $i! 1>&2