Commit | Line | Data |
---|---|---|
e7db3d77 | 1 | # .Sanitize for devo/gdb/testsuite. |
bf3d2b75 | 2 | |
33268150 | 3 | # Each directory to survive its way into a release will need a file |
bf3d2b75 MW |
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 | |
14 | # done in this directory. | |
15 | ||
16 | Do-first: | |
17 | ||
f35ea218 KS |
18 | gdbtk_files="gdb.gdbtk" |
19 | ||
20 | if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then | |
21 | lose_these_too="${gdbtk_files} ${lose_these_too}" | |
22 | if [ -n "${verbose}" ] ; then | |
23 | echo Deleting ${gdbtk_files} | |
24 | fi | |
25 | else | |
26 | keep_these_too="${gdbtk_files} ${keep_these_too}" | |
27 | if [ -n "${verbose}" ] ; then | |
28 | echo Keeping ${gdbtk_files} | |
29 | fi | |
30 | fi | |
31 | ||
bf3d2b75 MW |
32 | # All files listed between the "Things-to-keep:" line and the |
33 | # "Do-last:" 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 | |
36 | # with rm -rf. | |
37 | ||
38 | Things-to-keep: | |
39 | ||
bf3d2b75 MW |
40 | .gdbinit |
41 | ChangeLog | |
42 | Makefile.in | |
80edc7cb | 43 | TODO |
e7db3d77 | 44 | aclocal.m4 |
bf3d2b75 | 45 | config |
e7db3d77 | 46 | configure |
bf3d2b75 | 47 | configure.in |
aeab18c9 | 48 | gdb.asm |
33268150 SS |
49 | gdb.base |
50 | gdb.c++ | |
87544f53 | 51 | gdb.chill |
15598f42 | 52 | gdb.disasm |
e3289040 | 53 | gdb.fortran |
2e11d9cc | 54 | gdb.hp |
5e786183 | 55 | gdb.stabs |
f27ffb51 | 56 | gdb.threads |
209c77a8 | 57 | gdb.trace |
33268150 SS |
58 | lib |
59 | ||
60 | Things-to-lose: | |
61 | ||
87756e15 | 62 | # The lines between the "Do-last:" line and the end of the file |
bf3d2b75 MW |
63 | # are executed as a /bin/sh shell script after everything else is |
64 | # done. | |
65 | ||
66 | Do-last: | |
67 | ||
1e012f70 FL |
68 | never_files="ChangeLog" |
69 | for i in $never_files ; do | |
70 | if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then | |
71 | if [ -n "${verbose}" ] ; then | |
72 | echo Removing traces of \"cygnus-never\" from $i... | |
73 | fi | |
74 | cp $i new | |
3cc72fbe | 75 | sed '/start\-sanitize\-cygnus-never/,/end\-sanitize\-cygnus-never/d' < $i > new |
1e012f70 FL |
76 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
77 | if [ -n "${verbose}" ] ; then | |
78 | echo Caching $i in .Recover... | |
79 | fi | |
80 | mv $i .Recover | |
81 | fi | |
82 | mv new $i | |
83 | fi | |
84 | done | |
85 | ||
54977a68 JL |
86 | am33_files="ChangeLog" |
87 | if ( echo $* | grep keep\-am33 > /dev/null ) ; then | |
88 | for i in $am33_files ; do | |
89 | if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then | |
90 | if [ -n "${verbose}" ] ; then | |
91 | echo Keeping am33 stuff in $i | |
92 | fi | |
93 | fi | |
94 | done | |
95 | else | |
96 | for i in $am33_files ; do | |
97 | if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then | |
98 | if [ -n "${verbose}" ] ; then | |
99 | echo Removing traces of \"am33\" from $i... | |
100 | fi | |
101 | cp $i new | |
102 | sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new | |
103 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
104 | if [ -n "${verbose}" ] ; then | |
105 | echo Caching $i in .Recover... | |
106 | fi | |
107 | mv $i .Recover | |
108 | fi | |
109 | mv new $i | |
110 | fi | |
111 | done | |
112 | fi | |
113 | ||
f35ea218 KS |
114 | if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then |
115 | echo Catering to RMS by removing traces of \"gdbtk\"... | |
116 | for i in * ; do | |
117 | if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then | |
118 | echo Removing traces of \"gdbtk\" out of $i... | |
119 | cp $i new | |
120 | sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new | |
121 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
122 | echo Caching $i in .Recover... | |
123 | mv $i .Recover | |
124 | fi | |
125 | mv new $i | |
126 | fi | |
127 | done | |
128 | else | |
129 | echo Leaving \"gdbtk\" in the sources... | |
130 | for i in * ; do | |
131 | if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then | |
132 | echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines... | |
133 | cp $i new | |
134 | sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new | |
135 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
136 | echo Caching $i in .Recover... | |
137 | mv $i .Recover | |
138 | fi | |
139 | mv new $i | |
140 | fi | |
141 | done | |
142 | fi | |
143 | ||
54977a68 JL |
144 | for i in * ; do |
145 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
146 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
147 | fi | |
148 | done | |
149 | ||
bf3d2b75 | 150 | # eof |