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 # mswin gdb is not really gdbtk, but is close enough for now.
20 gdbtk_files="gdbtk.c gdbtk.tcl mswin"
22 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
23 lose_these_too="${gdbtk_files} ${lose_these_too}"
24 if [ -n "${verbose}" ] ; then
25 echo Deleting ${gdbtk_files}
28 keep_these_too="${gdbtk_files} ${keep_these_too}"
29 if [ -n "${verbose}" ] ; then
30 echo Keeping ${gdbtk_files}
34 # All files listed between the "Things-to-keep:" line and the
35 # "Files-to-sed:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
317 # Things which are explicitly *not* kept, for now.
318 # energize - Part of Lucid support.
319 # energize-patches - Part of Lucid support.
320 # energize.c - Part of Lucid support.
321 # energize.h - Part of Lucid support.
322 # remote-sa.sparc.c - Remote target for a standalone SPARC, using
323 # the FORTH console ROMs. We never got the paperwork
324 # straight, since Sun's lawyers messed with the
325 # FSF contract and RMS didn't accept the changes.
326 # Written at SunLabs.
327 # state.c - Not used at the moment, keep for reference (fnf)
328 # state.h - Not used at the moment, keep for reference (fnf)
346 echo Catering to RMS by removing traces of \"gdbtk\"...
348 # Don't try to clean directories here, as the 'mv' command will fail.
349 # Also, grep fails on NFS mounted directories.
350 if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then
352 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
353 echo Keeping gdbtk stuff in $i
358 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
359 echo Removing traces of \"gdbtk\" out of $i...
361 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
362 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
363 echo Caching $i in .Recover...
371 r16_files="configure.in"
373 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
374 for i in $r16_files ; do
375 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
376 if [ -n "${verbose}" ] ; then
377 echo Keeping r16 stuff in $i
382 for i in $r16_files ; do
383 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
384 if [ -n "${verbose}" ] ; then
385 echo Removing traces of \"r16\" from $i...
388 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
389 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
390 if [ -n "${verbose}" ] ; then
391 echo Caching $i in .Recover...
400 arc_files="configure.in ChangeLog"
402 if ( echo $* | grep keep\-arc > /dev/null ) ; then
403 for i in $arc_files ; do
404 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
405 if [ -n "${verbose}" ] ; then
406 echo Keeping arc stuff in $i
411 for i in $arc_files ; do
412 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
413 if [ -n "${verbose}" ] ; then
414 echo Removing traces of \"arc\" from $i...
417 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
418 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
419 if [ -n "${verbose}" ] ; then
420 echo Caching $i in .Recover...
430 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
431 echo '***' Some mentions of Sanitize are still left in $i! 1>&2