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 mpw_files="mpw-config.in mpw-make.in ser-mac.c mac-xdep.c mac-defs.h macgdb.r ChangeLog.mpw"
20 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
21 keep_these_too="${mpw_files} ${keep_these_too}"
22 if [ -n "${verbose}" ] ; then
23 echo Keeping ${mpw_files}
26 lose_these_too="${mpw_files} ${lose_these_too}"
27 if [ -n "${verbose}" ] ; then
28 echo Deleting ${mpw_files}
32 # mswin gdb is not really gdbtk, but is close enough for now.
34 gdbtk_files="gdbtk.c gdbtk.tcl mswin"
36 if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then
37 keep_these_too="${gdbtk_files} ${keep_these_too}"
38 if [ -n "${verbose}" ] ; then
39 echo Keeping ${gdbtk_files}
42 lose_these_too="${gdbtk_files} ${lose_these_too}"
43 if [ -n "${verbose}" ] ; then
44 echo Deleting ${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
325 # Things which are explicitly *not* kept, for now.
326 # energize - Part of Lucid support.
327 # energize-patches - Part of Lucid support.
328 # energize.c - Part of Lucid support.
329 # energize.h - Part of Lucid support.
330 # remote-sa.sparc.c - Remote target for a standalone SPARC, using
331 # the FORTH console ROMs. We never got the paperwork
332 # straight, since Sun's lawyers messed with the
333 # FSF contract and RMS didn't accept the changes.
334 # Written at SunLabs.
335 # state.c - Not used at the moment, keep for reference (fnf)
336 # state.h - Not used at the moment, keep for reference (fnf)
352 echo Removing traces of \"mpw\"...
354 # Don't try to clean directories here, as the 'mv' command will fail.
355 # Also, grep fails on NFS mounted directories.
356 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
358 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
359 echo Keeping mpw stuff in $i
364 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
365 echo Removing traces of \"mpw\" out of $i...
367 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
368 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
369 echo Caching $i in .Recover...
377 echo Catering to RMS by removing traces of \"gdbtk\"...
379 # Don't try to clean directories here, as the 'mv' command will fail.
380 # Also, grep fails on NFS mounted directories.
381 if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then
383 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
384 echo Keeping gdbtk stuff in $i
389 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
390 echo Removing traces of \"gdbtk\" out of $i...
392 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
393 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
394 echo Caching $i in .Recover...
402 r16_files="configure.in"
404 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
405 for i in $r16_files ; do
406 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
407 if [ -n "${verbose}" ] ; then
408 echo Keeping r16 stuff in $i
413 for i in $r16_files ; do
414 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
415 if [ -n "${verbose}" ] ; then
416 echo Removing traces of \"r16\" from $i...
419 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
420 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
421 if [ -n "${verbose}" ] ; then
422 echo Caching $i in .Recover...
431 arc_files="configure.in"
433 if ( echo $* | grep keep\-arc > /dev/null ) ; then
434 for i in $arc_files ; do
435 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
436 if [ -n "${verbose}" ] ; then
437 echo Keeping arc stuff in $i
442 for i in $arc_files ; do
443 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
444 if [ -n "${verbose}" ] ; then
445 echo Removing traces of \"arc\" from $i...
448 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
449 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
450 if [ -n "${verbose}" ] ; then
451 echo Caching $i in .Recover...
461 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
462 echo '***' Some mentions of Sanitize are still left in $i! 1>&2