Commit | Line | Data |
---|---|---|
43e36dd2 | 1 | # .Sanitize for devo. |
a93b3c77 | 2 | |
5db7ecb7 | 3 | # Each directory to survive its way into a release will need a file |
a93b3c77 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 | |
43e36dd2 | 14 | # done in this directory. |
a93b3c77 RP |
15 | |
16 | Do-first: | |
17 | ||
eccc57e5 | 18 | cygnus_files="release release-info build-all.mk" |
96c805d8 | 19 | |
7d0eab7b | 20 | if ( echo $* | grep keep\-cygnus > /dev/null) ; then |
96c805d8 | 21 | keep_these_too="${keep_these_too} ${cygnus_files}" |
80cad9cc | 22 | else |
96c805d8 | 23 | lose_these_too="${lose_these_too} ${cygnus_files}" |
7d0eab7b DZ |
24 | fi |
25 | ||
eccc57e5 | 26 | mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw" |
96c805d8 | 27 | |
5db7ecb7 | 28 | if ( echo $* | grep keep\-mpw > /dev/null) ; then |
96c805d8 | 29 | keep_these_too="${keep_these_too} ${mpw_files}" |
5db7ecb7 | 30 | else |
96c805d8 | 31 | lose_these_too="${lose_these_too} ${mpw_files}" |
5db7ecb7 | 32 | fi |
7d0eab7b | 33 | |
a93b3c77 | 34 | # All files listed between the "Things-to-keep:" line and the |
43e36dd2 | 35 | # "Do-last:" line will be kept. All other files will be removed. |
a93b3c77 RP |
36 | # Directories listed in this section will have their own Sanitize |
37 | # called. Directories not listed will be removed in their entirety | |
38 | # with rm -rf. | |
39 | ||
40 | Things-to-keep: | |
41 | ||
c9b36b5f | 42 | .cvsignore |
6e37b215 PB |
43 | COPYING |
44 | COPYING.LIB | |
6227a92b | 45 | CYGNUS |
57d32184 | 46 | ChangeLog |
a93b3c77 | 47 | Makefile.in |
965a9f14 | 48 | README |
28f760d3 | 49 | autoconf |
d5eb68fa | 50 | bfd |
ebec4684 | 51 | binutils |
6a2d7603 | 52 | byacc |
a93b3c77 | 53 | config |
5cc24596 | 54 | config.guess |
db2de419 | 55 | config.sub |
a93b3c77 RP |
56 | configure |
57 | configure.in | |
cdabe523 | 58 | cvs |
8ec1b2a1 | 59 | deja-gnu |
d623fd7e | 60 | dejagnu |
5781b1ba | 61 | diff |
4e0c2de7 | 62 | dvips |
cdabe523 | 63 | emacs |
701df845 | 64 | etc |
17519312 | 65 | expect |
4e0c2de7 | 66 | fileutils |
49df2308 | 67 | flex |
a93b3c77 | 68 | gas |
ebec4684 RP |
69 | gcc |
70 | gdb | |
f3d3d2cd | 71 | gdbm |
e72c4b3a | 72 | gdbtest |
f7f4df6a | 73 | glob |
9a14a29d | 74 | gprof |
5781b1ba | 75 | grep |
4e0c2de7 | 76 | groff |
a93b3c77 | 77 | include |
4a01dc52 | 78 | install.sh |
2dbd15d2 | 79 | ispell |
ebec4684 | 80 | ld |
0862386b | 81 | libg++ |
e72c4b3a RP |
82 | libgcc |
83 | libiberty | |
7c4dd2c8 | 84 | libio |
4e0c2de7 | 85 | m4 |
cdabe523 | 86 | make |
d592622a | 87 | mmalloc |
e72c4b3a | 88 | move-if-change |
6ae8fff5 | 89 | newlib |
aa06ff7e | 90 | opcodes |
ba8acf46 | 91 | pagas |
57d32184 | 92 | patch |
d42563da | 93 | prms |
3c8735af | 94 | rcs |
a93b3c77 | 95 | readline |
4e0c2de7 | 96 | sed |
00d8b290 | 97 | send-pr |
4e0c2de7 | 98 | shellutils |
da7e4b5c | 99 | sim |
17519312 | 100 | tcl |
4e0c2de7 DZ |
101 | textutils |
102 | tk | |
c9b36b5f | 103 | test-build.mk |
d239963b | 104 | texinfo |
14bed8ee | 105 | tgas |
ba8acf46 | 106 | utils |
fa64be8d | 107 | uudecode |
4e0c2de7 DZ |
108 | wdiff |
109 | xiberty | |
a93b3c77 | 110 | |
87756e15 RP |
111 | Things-to-lose: |
112 | ||
43e36dd2 RP |
113 | # The lines between the "Do-last:" line and the end of the file |
114 | # are executed as a /bin/sh shell script after everything else is | |
115 | # done. | |
116 | ||
a93b3c77 RP |
117 | Do-last: |
118 | ||
7b85349f RP |
119 | if ( echo $* | egrep verbose > /dev/null ) ; then |
120 | verbose=true | |
121 | else | |
122 | verbose= | |
123 | fi | |
124 | ||
eecef7ef FF |
125 | # Remove "sanitize-Sanitize" lines. |
126 | if [ -n "${verbose}" ] ; then | |
127 | echo Cleaning unconditional sanitizations out of Makefile.in... | |
128 | fi | |
129 | cp Makefile.in new | |
130 | sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new | |
131 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
132 | mv Makefile.in .Recover | |
133 | fi | |
134 | mv new Makefile.in | |
135 | ||
7b85349f RP |
136 | if [ -n "${verbose}" ] ; then |
137 | echo Looking for signs of \"v9\"... | |
138 | fi | |
eebff21c JG |
139 | |
140 | # Don't try to clean directories here, as the 'mv' command will fail. | |
141 | # Also, grep fails on NFS mounted directories. | |
142 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then | |
143 | for i in * ; do | |
144 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
7b85349f RP |
145 | if [ -n "${verbose}" ] ; then |
146 | echo Keeping v9 stuff in $i | |
147 | fi | |
eebff21c JG |
148 | fi |
149 | done | |
150 | else | |
151 | for i in * ; do | |
152 | if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then | |
7b85349f RP |
153 | if [ -n "${verbose}" ] ; then |
154 | echo Cleaning the \"v9\" out of $i... | |
155 | fi | |
e00efef1 | 156 | cp $i new |
eebff21c JG |
157 | sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new |
158 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
159 | mv $i .Recover | |
160 | fi | |
161 | mv new $i | |
eebff21c JG |
162 | fi |
163 | done | |
164 | fi | |
165 | ||
7b85349f RP |
166 | if [ -n "${verbose}" ] ; then |
167 | echo Thawing away the \"chill\"... | |
168 | fi | |
5d4ec851 FF |
169 | |
170 | # Don't try to clean directories here, as the 'mv' command will fail. | |
171 | # Also, grep fails on NFS mounted directories. | |
172 | if ( echo $* | grep keep\-chill > /dev/null ) ; then | |
173 | for i in * ; do | |
174 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
175 | if [ -n "${verbose}" ] ; then |
176 | echo Keeping chill stuff in $i | |
177 | fi | |
5d4ec851 FF |
178 | fi |
179 | done | |
180 | else | |
181 | for i in * ; do | |
182 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
183 | if [ -n "${verbose}" ] ; then |
184 | echo Thawing the \"chill\" out of $i... | |
185 | fi | |
5d4ec851 FF |
186 | cp $i new |
187 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
188 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7b85349f RP |
189 | if [ -n "${verbose}" ] ; then |
190 | echo Caching $i in .Recover... | |
191 | fi | |
5d4ec851 FF |
192 | mv $i .Recover |
193 | fi | |
194 | mv new $i | |
195 | fi | |
196 | done | |
5d4ec851 FF |
197 | fi |
198 | ||
5db7ecb7 SS |
199 | if [ -n "${verbose}" ] ; then |
200 | echo Removing traces of \"mpw\"... | |
201 | fi | |
202 | ||
203 | # Don't try to clean directories here, as the 'mv' command will fail. | |
204 | # Also, grep fails on NFS mounted directories. | |
205 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then | |
206 | for i in * ; do | |
207 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
208 | if [ -n "${verbose}" ] ; then | |
209 | echo Keeping mpw stuff in $i | |
210 | fi | |
211 | fi | |
212 | done | |
213 | else | |
214 | for i in * ; do | |
215 | if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then | |
216 | if [ -n "${verbose}" ] ; then | |
217 | echo Removing traces of \"mpw\" from $i... | |
218 | fi | |
219 | cp $i new | |
220 | sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new | |
221 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
222 | if [ -n "${verbose}" ] ; then | |
223 | echo Caching $i in .Recover... | |
224 | fi | |
225 | mv $i .Recover | |
226 | fi | |
227 | mv new $i | |
228 | fi | |
229 | done | |
230 | fi | |
231 | ||
e11b54be PB |
232 | for i in * ; do |
233 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
7b85349f | 234 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 |
e11b54be PB |
235 | fi |
236 | done | |
57d32184 RP |
237 | |
238 | # eof |