1 # .Sanitize for gdb/doc.
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 # Note that gdbgui.texinfo is actually a generic document, but right
19 # now it only describes gdbtk, so we keep/lose as a gdbtk file.
21 gdbtk_files="gdbgui.texinfo"
23 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
24 lose_these_too="${gdbtk_files} ${lose_these_too}"
25 if [ -n "${verbose}" ] ; then
26 echo Deleting ${gdbtk_files}
29 keep_these_too="${gdbtk_files} ${keep_these_too}"
30 if [ -n "${verbose}" ] ; then
31 echo Keeping ${gdbtk_files}
35 # All files listed between the "Things-to-keep:" line and the
36 # "Files-to-sed:" line will be kept. All other files will be removed.
37 # Directories listed in this section will have their own Sanitize
38 # called. Directories not listed will be removed in their entirety
41 # Note that we don't even keep the "config" directory, since it is
42 # not currently used (since we abolished use of M4 in the docs).
68 # The README file for gdb testers using snapshots.
73 # Don't try to clean directories here, as the 'mv' command will fail.
74 # Also, grep fails on NFS mounted directories.
75 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
76 echo Catering to RMS by removing traces of \"gdbtk\"...
78 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
79 echo Removing traces of \"gdbtk\" out of $i...
81 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
82 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
83 echo Caching $i in .Recover...
90 echo Leaving \"gdbtk\" in the sources...
92 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
93 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
95 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
96 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
97 echo Caching $i in .Recover...