* Makefile.in (GDBvn.texi): Fix match expression to work with
[deliverable/binutils-gdb.git] / gdb / doc / .Sanitize
CommitLineData
08df3284 1# .Sanitize for gdb/doc.
a3e65382 2
08df3284 3# Each directory to survive its way into a release will need a file
a3e65382
RP
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.
7
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
10# out.
11
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
08df3284 14# done in this directory.
a3e65382
RP
15
16Do-first:
17
237eaf37
SS
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.
20
21gdbtk_files="gdbgui.texinfo"
22
58840528
SS
23if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
24 lose_these_too="${gdbtk_files} ${lose_these_too}"
237eaf37 25 if [ -n "${verbose}" ] ; then
58840528 26 echo Deleting ${gdbtk_files}
237eaf37
SS
27 fi
28else
58840528 29 keep_these_too="${gdbtk_files} ${keep_these_too}"
237eaf37 30 if [ -n "${verbose}" ] ; then
58840528 31 echo Keeping ${gdbtk_files}
237eaf37
SS
32 fi
33fi
34
a3e65382
RP
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
39# with rm -rf.
40
145887f0
JG
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).
43
a3e65382
RP
44Things-to-keep:
45
ace52033 46ChangeLog
13b470dc 47HPPA-cfg.texi
db0af6f7 48LRS
3d29576b 49Makefile.in
34a6ce55 50a4rc.sed
ffd4e62b 51agentexpr.texi
a1330c48 52all-cfg.texi
a9363218 53annotate.texi
2e6516ff 54configure
3d29576b 55configure.in
429ad34d 56libgdb.texinfo
a3e65382 57gdb.texinfo
a3e65382 58gdbint.texinfo
a1330c48 59h8-cfg.texi
17cd0f82 60lpsrc.sed
dcfc4f45 61psrc.sed
73dfae8d 62refcard.tex
e6616862 63remote.texi
e505224d 64stabs.texinfo
a3e65382 65
87756e15
RP
66Things-to-lose:
67
a09acbda
FF
68# The README file for gdb testers using snapshots.
69snapshots.readme
87756e15 70
a3e65382
RP
71Do-last:
72
237eaf37
SS
73# Don't try to clean directories here, as the 'mv' command will fail.
74# Also, grep fails on NFS mounted directories.
58840528
SS
75if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
76 echo Catering to RMS by removing traces of \"gdbtk\"...
237eaf37
SS
77 for i in * ; do
78 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
58840528
SS
79 echo Removing traces of \"gdbtk\" out of $i...
80 cp $i new
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...
84 mv $i .Recover
85 fi
86 mv new $i
237eaf37
SS
87 fi
88 done
89else
58840528 90 echo Leaving \"gdbtk\" in the sources...
237eaf37
SS
91 for i in * ; do
92 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
58840528 93 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
237eaf37 94 cp $i new
58840528 95 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
237eaf37
SS
96 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
97 echo Caching $i in .Recover...
98 mv $i .Recover
99 fi
100 mv new $i
101 fi
102 done
103fi
104
a3e65382 105# End of file.
This page took 0.312618 seconds and 4 git commands to generate.