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 gdbtk_files="gdbtk.c gdbtk.tcl"
34 if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then
35 keep_these_too="${gdbtk_files} ${keep_these_too}"
36 if [ -n "${verbose}" ] ; then
37 echo Keeping ${gdbtk_files}
40 lose_these_too="${gdbtk_files} ${lose_these_too}"
41 if [ -n "${verbose}" ] ; then
42 echo Deleting ${gdbtk_files}
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
332 # Things which are explicitly *not* kept, for now.
333 # energize - Part of Lucid support.
334 # energize-patches - Part of Lucid support.
335 # energize.c - Part of Lucid support.
336 # energize.h - Part of Lucid support.
337 # remote-sa.sparc.c - Remote target for a standalone SPARC, using
338 # the FORTH console ROMs. We never got the paperwork
339 # straight, since Sun's lawyers messed with the
340 # FSF contract and RMS didn't accept the changes.
341 # Written at SunLabs.
342 # state.c - Not used at the moment, keep for reference (fnf)
343 # state.h - Not used at the moment, keep for reference (fnf)
357 echo Removing traces of \"mpw\"...
359 # Don't try to clean directories here, as the 'mv' command will fail.
360 # Also, grep fails on NFS mounted directories.
361 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
363 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
364 echo Keeping mpw stuff in $i
369 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
370 echo Removing traces of \"mpw\" out of $i...
372 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
373 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
374 echo Caching $i in .Recover...
382 echo Catering to RMS by removing traces of \"gdbtk\"...
384 # Don't try to clean directories here, as the 'mv' command will fail.
385 # Also, grep fails on NFS mounted directories.
386 if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then
388 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
389 echo Keeping gdbtk stuff in $i
394 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
395 echo Removing traces of \"gdbtk\" out of $i...
397 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
398 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
399 echo Caching $i in .Recover...
407 r16_files="configure.in"
409 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
410 for i in $r16_files ; do
411 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
412 if [ -n "${verbose}" ] ; then
413 echo Keeping r16 stuff in $i
418 for i in $r16_files ; do
419 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
420 if [ -n "${verbose}" ] ; then
421 echo Removing traces of \"r16\" from $i...
424 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
425 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
426 if [ -n "${verbose}" ] ; then
427 echo Caching $i in .Recover...
437 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
438 echo '***' Some mentions of Sanitize are still left in $i! 1>&2