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 mpw-init.c 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 # All files listed between the "Things-to-keep:" line and the
33 # "Files-to-sed:" line will be kept. All other files will be removed.
34 # Directories listed in this section will have their own Sanitize
35 # called. Directories not listed will be removed in their entirety
318 # Things which are explicitly *not* kept, for now.
319 # energize - Part of Lucid support.
320 # energize-patches - Part of Lucid support.
321 # energize.c - Part of Lucid support.
322 # energize.h - Part of Lucid support.
323 # remote-sa.sparc.c - Remote target for a standalone SPARC, using
324 # the FORTH console ROMs. We never got the paperwork
325 # straight, since Sun's lawyers messed with the
326 # FSF contract and RMS didn't accept the changes.
327 # Written at SunLabs.
328 # state.c - Not used at the moment, keep for reference (fnf)
329 # state.h - Not used at the moment, keep for reference (fnf)
343 echo Removing traces of \"mpw\"...
345 # Don't try to clean directories here, as the 'mv' command will fail.
346 # Also, grep fails on NFS mounted directories.
347 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
349 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
350 echo Keeping mpw stuff in $i
355 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
356 echo Removing traces of \"mpw\" out of $i...
358 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
359 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
360 echo Caching $i in .Recover...
368 echo Removing traces of \"hpread\"...
370 # Don't try to clean directories here, as the 'mv' command will fail.
371 # Also, grep fails on NFS mounted directories.
372 if ( echo $* | grep keep\-hpread > /dev/null ) ; then
374 if test ! -d $i && (grep sanitize-hpread $i > /dev/null) ; then
375 echo Keeping hpread stuff in $i
380 if test ! -d $i && (grep sanitize-hpread $i > /dev/null) ; then
381 echo Removing traces of \"hpread\" out of $i...
383 sed '/start\-sanitize\-hpread/,/end-\sanitize\-hpread/d' < $i > new
384 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
385 echo Caching $i in .Recover...
394 r16_files = "configure.in"
396 if ( echo $* | grep keep\-r16 > /dev/null ) ; then
397 for i in $r16_files ; do
398 if test ! -d $i && (grep sanitize-r16 $i > /dev/null) ; then
399 if [ -n "${verbose}" ] ; then
400 echo Keeping r16 stuff in $i
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 Removing traces of \"r16\" from $i...
411 sed '/start\-sanitize\-r16/,/end-\sanitize\-r16/d' < $i > new
412 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
413 if [ -n "${verbose}" ] ; then
414 echo Caching $i in .Recover...
424 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
425 echo '***' Some mentions of Sanitize are still left in $i! 1>&2