Commit | Line | Data |
---|---|---|
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 | |
16 | Do-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 | ||
21 | gdbtk_files="gdbgui.texinfo" | |
22 | ||
23 | if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then | |
24 | keep_these_too="${gdbtk_files} ${keep_these_too}" | |
25 | if [ -n "${verbose}" ] ; then | |
26 | echo Keeping ${gdbtk_files} | |
27 | fi | |
28 | else | |
29 | lose_these_too="${gdbtk_files} ${lose_these_too}" | |
30 | if [ -n "${verbose}" ] ; then | |
31 | echo Deleting ${gdbtk_files} | |
32 | fi | |
33 | fi | |
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 |
44 | Things-to-keep: |
45 | ||
ace52033 | 46 | ChangeLog |
3d29576b | 47 | Makefile.in |
34a6ce55 | 48 | a4rc.sed |
a1330c48 | 49 | all-cfg.texi |
a9363218 | 50 | annotate.texi |
3d29576b | 51 | configure.in |
429ad34d | 52 | libgdb.texinfo |
a3e65382 | 53 | gdb.texinfo |
a3e65382 | 54 | gdbint.texinfo |
a1330c48 | 55 | h8-cfg.texi |
17cd0f82 | 56 | lpsrc.sed |
dcfc4f45 | 57 | psrc.sed |
73dfae8d | 58 | refcard.tex |
e6616862 | 59 | remote.texi |
e505224d | 60 | stabs.texinfo |
a3e65382 | 61 | |
87756e15 RP |
62 | Things-to-lose: |
63 | ||
274eb90a | 64 | # Cygnus logo bitmap, huge file, no point in bundling all over the place. |
40055e58 | 65 | cyglogo.eps |
fd6d7556 | 66 | # Includes cyglogo.eps. |
40055e58 FF |
67 | cygref.tex |
68 | ||
a09acbda FF |
69 | # The README file for gdb testers using snapshots. |
70 | snapshots.readme | |
87756e15 | 71 | |
a3e65382 RP |
72 | Do-last: |
73 | ||
237eaf37 SS |
74 | echo Catering to RMS by removing traces of \"gdbtk\"... |
75 | ||
76 | # Don't try to clean directories here, as the 'mv' command will fail. | |
77 | # Also, grep fails on NFS mounted directories. | |
78 | if ( echo $* | grep keep\-gdbtk > /dev/null ) ; then | |
79 | for i in * ; do | |
80 | if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then | |
81 | echo Keeping gdbtk stuff in $i | |
82 | fi | |
83 | done | |
84 | else | |
85 | for i in * ; do | |
86 | if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then | |
87 | echo Removing traces of \"gdbtk\" out of $i... | |
88 | cp $i new | |
89 | sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new | |
90 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
91 | echo Caching $i in .Recover... | |
92 | mv $i .Recover | |
93 | fi | |
94 | mv new $i | |
95 | fi | |
96 | done | |
97 | fi | |
98 | ||
a3e65382 | 99 | # End of file. |