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 gdbtk_files="README.GDBTK gdbtk.c gdbtk.tcl"
34 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
35 lose_these_too="${gdbtk_files} ${lose_these_too}"
36 if [ -n "${verbose}" ] ; then
37 echo Deleting ${gdbtk_files}
40 keep_these_too="${gdbtk_files} ${keep_these_too}"
41 if [ -n "${verbose}" ] ; then
42 echo Keeping ${gdbtk_files}
46 # WinGDB files are not really ready to be part of FSF releases, but
47 # keep them for progressives and such.
51 if ( echo $* | grep lose\-mswin > /dev/null ) ; then
52 lose_these_too="${mswin_files} ${lose_these_too}"
53 if [ -n "${verbose}" ] ; then
54 echo Deleting ${mswin_files}
57 keep_these_too="${mswin_files} ${keep_these_too}"
58 if [ -n "${verbose}" ] ; then
59 echo Keeping ${mswin_files}
63 # All files listed between the "Things-to-keep:" line and the
64 # "Files-to-sed:" line will be kept. All other files will be removed.
65 # Directories listed in this section will have their own Sanitize
66 # called. Directories not listed will be removed in their entirety
352 # Things which are explicitly *not* kept, for now.
361 # Don't try to clean directories here, as the 'mv' command will fail.
362 # Also, grep fails on NFS mounted directories.
363 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
364 echo Catering to RMS by removing traces of \"gdbtk\"...
366 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
367 echo Removing traces of \"gdbtk\" out of $i...
369 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
370 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
371 echo Caching $i in .Recover...
378 echo Leaving \"gdbtk\" in the sources...
380 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
381 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
383 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
384 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
385 echo Caching $i in .Recover...
393 r16_files="configure.in"
395 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
396 for i in $r16_files ; do
397 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
398 if [ -n "${verbose}" ] ; then
399 echo Keeping r16 stuff in $i
404 for i in $r16_files ; do
405 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
406 if [ -n "${verbose}" ] ; then
407 echo Removing traces of \"r16\" from $i...
410 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
411 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
412 if [ -n "${verbose}" ] ; then
413 echo Caching $i in .Recover...
422 arc_files="configure.in ChangeLog"
424 if ( echo $* | grep keep\-arc > /dev/null ) ; then
425 for i in $arc_files ; do
426 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
427 if [ -n "${verbose}" ] ; then
428 echo Keeping arc stuff in $i
433 for i in $arc_files ; do
434 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
435 if [ -n "${verbose}" ] ; then
436 echo Removing traces of \"arc\" from $i...
439 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
440 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
441 if [ -n "${verbose}" ] ; then
442 echo Caching $i in .Recover...
452 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
453 echo '***' Some mentions of Sanitize are still left in $i! 1>&2