1 # .Sanitize for devo/gdb.
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
14 # done in this directory.
18 arc_files="arc-tdep.c remote-arc.c"
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Keeping ${arc_files}
26 lose_these_too="${arc_files} ${lose_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Deleting ${arc_files}
32 # mswin gdb is not really gdbtk, but is close enough for now.
34 gdbtk_files="README.GDBTK gdbtk.c gdbtk.tcl mswin"
36 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
37 lose_these_too="${gdbtk_files} ${lose_these_too}"
38 if [ -n "${verbose}" ] ; then
39 echo Deleting ${gdbtk_files}
42 keep_these_too="${gdbtk_files} ${keep_these_too}"
43 if [ -n "${verbose}" ] ; then
44 echo Keeping ${gdbtk_files}
48 # All files listed between the "Things-to-keep:" line and the
49 # "Files-to-sed:" line will be kept. All other files will be removed.
50 # Directories listed in this section will have their own Sanitize
51 # called. Directories not listed will be removed in their entirety
335 # Things which are explicitly *not* kept, for now.
336 # energize - Part of Lucid support.
337 # energize-patches - Part of Lucid support.
338 # energize.c - Part of Lucid support.
339 # energize.h - Part of Lucid support.
340 # remote-sa.sparc.c - Remote target for a standalone SPARC, using
341 # the FORTH console ROMs. We never got the paperwork
342 # straight, since Sun's lawyers messed with the
343 # FSF contract and RMS didn't accept the changes.
344 # Written at SunLabs.
345 # state.c - Not used at the moment, keep for reference (fnf)
346 # state.h - Not used at the moment, keep for reference (fnf)
362 echo Catering to RMS by removing traces of \"gdbtk\"...
364 # Don't try to clean directories here, as the 'mv' command will fail.
365 # Also, grep fails on NFS mounted directories.
366 if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then
368 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
369 echo Keeping gdbtk stuff in $i
374 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
375 echo Removing traces of \"gdbtk\" out of $i...
377 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
378 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
379 echo Caching $i in .Recover...
387 r16_files="configure.in"
389 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
390 for i in $r16_files ; do
391 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
392 if [ -n "${verbose}" ] ; then
393 echo Keeping r16 stuff in $i
398 for i in $r16_files ; do
399 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
400 if [ -n "${verbose}" ] ; then
401 echo Removing traces of \"r16\" from $i...
404 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
405 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
406 if [ -n "${verbose}" ] ; then
407 echo Caching $i in .Recover...
416 arc_files="configure.in ChangeLog"
418 if ( echo $* | grep keep\-arc > /dev/null ) ; then
419 for i in $arc_files ; do
420 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
421 if [ -n "${verbose}" ] ; then
422 echo Keeping arc stuff in $i
427 for i in $arc_files ; do
428 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
429 if [ -n "${verbose}" ] ; then
430 echo Removing traces of \"arc\" from $i...
433 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
434 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
435 if [ -n "${verbose}" ] ; then
436 echo Caching $i in .Recover...
446 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
447 echo '***' Some mentions of Sanitize are still left in $i! 1>&2