]>
Commit | Line | Data |
---|---|---|
694ea471 | 1 | ######################## |
3a58da89 KR |
2 | # |
3 | # H H EEEEEE Y Y !! | |
4 | # H H E Y Y !! | |
5 | # H H E Y Y !! | |
6 | # H H E Y !! | |
7 | # HHHHHH EEEEE Y !! | |
8 | # H H E Y !! | |
9 | # H H E Y !! | |
10 | # H H E Y | |
11 | # H H EEEEEE Y !! | |
12 | # | |
694ea471 KR |
13 | # YO! READ ME!!!!!!!!! |
14 | # If you're about to add a file or directory which isn't checked out as part | |
15 | # of every module in devo (e.g., if "cvs co gas+utils" won't get it, or if | |
16 | # "cvs co gcc" won't get it), then don't, Don't, DON'T add it to the regular | |
17 | # things-to-keep or things-to-lose sections. Instead, add it to the setting | |
18 | # of keep_these_too or lose_these_too before those variables are rescanned | |
19 | # to check for the existence of the items listed in them. | |
20 | # | |
21 | # Otherwise, somebody will check out some package that doesn't include your | |
22 | # new file, and will get warnings from Sanitize when everything is really | |
23 | # okay. You don't want to get people in the habit of ignoring complaints from | |
24 | # Sanitize, do you? No, I didn't think so. | |
9719168f DE |
25 | # |
26 | # If you do add a file to the regular things-to-keep section, don't forget | |
27 | # to add the corresponding entry to the devo-support entry (or whatever) in | |
28 | # the modules file. | |
29 | # | |
694ea471 KR |
30 | ######################## |
31 | ||
3a58da89 KR |
32 | # .Sanitize for devo. |
33 | ||
5db7ecb7 | 34 | # Each directory to survive its way into a release will need a file |
a93b3c77 RP |
35 | # like this one called "./.Sanitize". All keyword lines must exist, |
36 | # and must exist in the order specified by this file. Each directory | |
37 | # in the tree will be processed, top down, in the following order. | |
38 | ||
39 | # Hash started lines like this one are comments and will be deleted | |
40 | # before anything else is done. Blank lines will also be squashed | |
41 | # out. | |
42 | ||
43 | # The lines between the "Do-first:" line and the "Things-to-keep:" | |
44 | # line are executed as a /bin/sh shell script before anything else is | |
43e36dd2 | 45 | # done in this directory. |
a93b3c77 RP |
46 | |
47 | Do-first: | |
48 | ||
1ed0529e | 49 | keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf |
e03b0bca KR |
50 | bfd binutils byacc cvs deja-gnu dejagnu diff dosrel dvips emacs emacs19 |
51 | examples expect fileutils flex gas gcc gdb gdbm gdbtest glob gprof grep | |
52 | groff include install.sh ispell ld libg++ libgcc libgloss libiberty | |
f38cb096 | 53 | libio librx libstdc++ m4 make mmalloc move-if-change newlib opcodes |
85f903e9 FF |
54 | pagas patch prms rcs readline sed send-pr shellutils sim textutils |
55 | texinfo tgas utils uudecode wdiff xiberty | |
efd7b806 | 56 | configure.bat makeall.bat winsup |
72a0431e | 57 | ctax gls goonix guile guile-docs libguile slib |
694ea471 KR |
58 | mpw-README mpw-configure mpw-config.in mpw-build.in" |
59 | ||
60 | lose_these_too="${lose_these_too} testsuite" | |
e03b0bca | 61 | |
2822305b | 62 | cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB" |
96c805d8 | 63 | |
7d0eab7b | 64 | if ( echo $* | grep keep\-cygnus > /dev/null) ; then |
96c805d8 | 65 | keep_these_too="${keep_these_too} ${cygnus_files}" |
80cad9cc | 66 | else |
96c805d8 | 67 | lose_these_too="${lose_these_too} ${cygnus_files}" |
7d0eab7b DZ |
68 | fi |
69 | ||
fc5a05e9 SS |
70 | gdbtk_files="tcl tk" |
71 | ||
72 | if ( echo $* | grep lose\-gdbtk > /dev/null) ; then | |
73 | lose_these_too="${lose_these_too} ${gdbtk_files}" | |
74 | if [ -n "${verbose}" ] ; then | |
75 | echo Deleting ${gdbtk_files} | |
76 | fi | |
77 | else | |
78 | keep_these_too="${keep_these_too} ${gdbtk_files}" | |
79 | if [ -n "${verbose}" ] ; then | |
80 | echo Keeping ${gdbtk_files} | |
81 | fi | |
5db7ecb7 | 82 | fi |
7d0eab7b | 83 | |
77cbdd35 | 84 | # This is for newlib net releases. |
c8205c90 | 85 | newlib_file="COPYING.NEWLIB" |
77cbdd35 | 86 | |
c8205c90 DE |
87 | if (echo $* | grep keep\-newlib > /dev/null) ; then |
88 | if (echo $* | grep -v keep\-cygnus > /dev/null) ; then | |
89 | keep_these_too="${keep_these_too} ${newlib_file}" | |
90 | lose_these_too="`echo ${lose_these_too} | sed -e s/${newlib_file}//`" | |
91 | fi | |
77cbdd35 | 92 | else |
c8205c90 | 93 | true; # Let keep-cygnus handle it. |
77cbdd35 DE |
94 | fi |
95 | ||
e03b0bca KR |
96 | # This top-level directory is special. We often check out only subsets |
97 | # of this directory, and complaining about directories or files we didn't | |
98 | # check out just gets obnoxious. | |
99 | ||
694ea471 | 100 | list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`" |
e03b0bca KR |
101 | keep_these_too= |
102 | ||
103 | for file in $list ; do | |
104 | if [ -r $file ] || [ -d $file ] ; then | |
105 | keep_these_too="${keep_these_too} $file" | |
106 | fi | |
107 | done | |
108 | ||
694ea471 | 109 | list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` " |
e03b0bca KR |
110 | lose_these_too= |
111 | ||
112 | for file in $list ; do | |
113 | if [ -r $file ] || [ -d $file ] ; then | |
114 | lose_these_too="${lose_these_too} $file" | |
115 | fi | |
116 | done | |
117 | ||
a93b3c77 | 118 | # All files listed between the "Things-to-keep:" line and the |
43e36dd2 | 119 | # "Do-last:" line will be kept. All other files will be removed. |
a93b3c77 RP |
120 | # Directories listed in this section will have their own Sanitize |
121 | # called. Directories not listed will be removed in their entirety | |
122 | # with rm -rf. | |
123 | ||
9719168f DE |
124 | # ??? It is debatable whether cfg-*.in belongs in Things-to-keep or |
125 | # keep_these_too. If someone feels strongly about it, please move them. | |
126 | ||
a93b3c77 RP |
127 | Things-to-keep: |
128 | ||
6e37b215 PB |
129 | COPYING |
130 | COPYING.LIB | |
57d32184 | 131 | ChangeLog |
a93b3c77 | 132 | Makefile.in |
965a9f14 | 133 | README |
a93b3c77 | 134 | config |
8c2d15d1 DE |
135 | cfg-ml-com.in |
136 | cfg-ml-pos.in | |
5cc24596 | 137 | config.guess |
db2de419 | 138 | config.sub |
a93b3c77 RP |
139 | configure |
140 | configure.in | |
701df845 | 141 | etc |
a93b3c77 | 142 | |
87756e15 RP |
143 | Things-to-lose: |
144 | ||
43e36dd2 RP |
145 | # The lines between the "Do-last:" line and the end of the file |
146 | # are executed as a /bin/sh shell script after everything else is | |
147 | # done. | |
148 | ||
a93b3c77 RP |
149 | Do-last: |
150 | ||
bf150019 DE |
151 | # Don't try to clean directories here, as the 'mv' command will fail. |
152 | # Also, grep fails on NFS mounted directories. | |
153 | ||
7b85349f RP |
154 | if ( echo $* | egrep verbose > /dev/null ) ; then |
155 | verbose=true | |
156 | else | |
157 | verbose= | |
158 | fi | |
159 | ||
eecef7ef FF |
160 | # Remove "sanitize-Sanitize" lines. |
161 | if [ -n "${verbose}" ] ; then | |
162 | echo Cleaning unconditional sanitizations out of Makefile.in... | |
163 | fi | |
164 | cp Makefile.in new | |
165 | sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new | |
166 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
167 | mv Makefile.in .Recover | |
168 | fi | |
169 | mv new Makefile.in | |
170 | ||
7b85349f RP |
171 | if [ -n "${verbose}" ] ; then |
172 | echo Thawing away the \"chill\"... | |
173 | fi | |
5d4ec851 | 174 | |
5d4ec851 FF |
175 | if ( echo $* | grep keep\-chill > /dev/null ) ; then |
176 | for i in * ; do | |
177 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
178 | if [ -n "${verbose}" ] ; then |
179 | echo Keeping chill stuff in $i | |
180 | fi | |
5d4ec851 FF |
181 | fi |
182 | done | |
183 | else | |
184 | for i in * ; do | |
185 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
186 | if [ -n "${verbose}" ] ; then |
187 | echo Thawing the \"chill\" out of $i... | |
188 | fi | |
5d4ec851 FF |
189 | cp $i new |
190 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
191 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7b85349f RP |
192 | if [ -n "${verbose}" ] ; then |
193 | echo Caching $i in .Recover... | |
194 | fi | |
5d4ec851 FF |
195 | mv $i .Recover |
196 | fi | |
197 | mv new $i | |
198 | fi | |
199 | done | |
5d4ec851 FF |
200 | fi |
201 | ||
86118528 KR |
202 | if [ -n "${verbose}" ] ; then |
203 | echo Processing \"arc\"... | |
204 | fi | |
205 | ||
f162a6a1 | 206 | arc_files="config.sub configure.in cfg-ml-com.in" |
bf150019 | 207 | |
86118528 | 208 | if ( echo $* | grep keep\-arc > /dev/null ) ; then |
bf150019 | 209 | for i in $arc_files ; do |
86118528 KR |
210 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then |
211 | if [ -n "${verbose}" ] ; then | |
212 | echo Keeping arc stuff in $i | |
213 | fi | |
214 | fi | |
215 | done | |
216 | else | |
217 | for i in * ; do | |
218 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
219 | if [ -n "${verbose}" ] ; then | |
220 | echo Removing traces of \"arc\" from $i... | |
221 | fi | |
222 | cp $i new | |
223 | sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new | |
bf150019 DE |
224 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
225 | if [ -n "${verbose}" ] ; then | |
226 | echo Caching $i in .Recover... | |
227 | fi | |
228 | mv $i .Recover | |
229 | fi | |
230 | mv new $i | |
231 | fi | |
232 | done | |
233 | fi | |
234 | ||
dee64d72 DE |
235 | if [ -n "${verbose}" ] ; then |
236 | echo Processing \"jaguar\"... | |
237 | fi | |
238 | ||
239 | jaguar_files="config.sub configure.in cfg-ml-com.in" | |
240 | ||
241 | if ( echo $* | grep keep\-jaguar > /dev/null ) ; then | |
242 | for i in $jaguar_files ; do | |
243 | if test ! -d $i && (grep sanitize-jaguar $i > /dev/null) ; then | |
244 | if [ -n "${verbose}" ] ; then | |
245 | echo Keeping jaguar stuff in $i | |
246 | fi | |
247 | fi | |
248 | done | |
249 | else | |
250 | for i in * ; do | |
251 | if test ! -d $i && (grep sanitize-jaguar $i > /dev/null) ; then | |
252 | if [ -n "${verbose}" ] ; then | |
253 | echo Removing traces of \"jaguar\" from $i... | |
254 | fi | |
255 | cp $i new | |
256 | sed '/start\-sanitize\-jaguar/,/end-\sanitize\-jaguar/d' < $i > new | |
257 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
258 | if [ -n "${verbose}" ] ; then | |
259 | echo Caching $i in .Recover... | |
260 | fi | |
261 | mv $i .Recover | |
262 | fi | |
263 | mv new $i | |
264 | fi | |
265 | done | |
266 | fi | |
267 | ||
bf150019 DE |
268 | psion_files="config.sub configure.in" |
269 | ||
270 | if ( echo $* | grep keep\-psion > /dev/null ) ; then | |
271 | for i in $psion_files; do | |
272 | if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then | |
273 | if [ -n "${verbose}" ] ; then | |
274 | echo Keeping psion stuff in $i | |
275 | fi | |
276 | fi | |
277 | done | |
278 | else | |
279 | for i in * ; do | |
280 | if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then | |
281 | if [ -n "${verbose}" ] ; then | |
282 | echo Removing traces of \"psion\" from $i... | |
283 | fi | |
284 | cp $i new | |
285 | sed '/start\-sanitize\-psion/,/end-\sanitize\-psion/d' < $i > new | |
86118528 KR |
286 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
287 | if [ -n "${verbose}" ] ; then | |
288 | echo Caching $i in .Recover... | |
289 | fi | |
290 | mv $i .Recover | |
291 | fi | |
292 | mv new $i | |
293 | fi | |
294 | done | |
295 | fi | |
296 | ||
03c4ce2f | 297 | rce_files="config.sub" |
5c680afd | 298 | |
03c4ce2f MT |
299 | if ( echo $* | grep keep\-rce > /dev/null ) ; then |
300 | for i in $rce_files ; do | |
301 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 302 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 303 | echo Keeping rce stuff in $i |
5c680afd MT |
304 | fi |
305 | fi | |
306 | done | |
307 | else | |
03c4ce2f MT |
308 | for i in $rce_files ; do |
309 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 310 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 311 | echo Removing traces of \"rce\" from $i... |
5c680afd MT |
312 | fi |
313 | cp $i new | |
03c4ce2f | 314 | sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new |
5c680afd MT |
315 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
316 | if [ -n "${verbose}" ] ; then | |
317 | echo Caching $i in .Recover... | |
318 | fi | |
319 | mv $i .Recover | |
320 | fi | |
321 | mv new $i | |
322 | fi | |
323 | done | |
324 | fi | |
325 | ||
bc55a53f C |
326 | sh3e_files="ChangeLog cfg-ml-com.in" |
327 | if ( echo $* | grep keep\-sh3e > /dev/null ) ; then | |
328 | for i in $sh3e_files ; do | |
329 | if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then | |
330 | if [ -n "${verbose}" ] ; then | |
331 | echo Keeping sh3e stuff in $i | |
332 | fi | |
333 | fi | |
334 | done | |
335 | else | |
336 | for i in $sh3e_files ; do | |
337 | if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then | |
338 | if [ -n "${verbose}" ] ; then | |
339 | echo Removing traces of \"sh3e\" from $i... | |
340 | fi | |
341 | cp $i new | |
342 | sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/d' < $i > new | |
343 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
344 | if [ -n "${verbose}" ] ; then | |
345 | echo Caching $i in .Recover... | |
346 | fi | |
347 | mv $i .Recover | |
348 | fi | |
349 | mv new $i | |
350 | fi | |
351 | done | |
352 | fi | |
353 | ||
354 | ||
aa800755 FF |
355 | if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then |
356 | echo Catering to RMS by removing traces of \"gdbtk\"... | |
357 | if [ -n "${verbose}" ] ; then | |
358 | echo Removing traces of \"gdbtk\" from Makefile.in... | |
359 | fi | |
360 | cp Makefile.in new | |
361 | sed -e '/GDBTK_SUPPORT_DIRS=/d' -e 's/ $(GDBTK_SUPPORT_DIRS)//' < Makefile.in > new | |
362 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
363 | if [ -n "${verbose}" ] ; then | |
364 | echo Caching Makefile.in in .Recover... | |
365 | fi | |
366 | mv Makefile.in .Recover | |
367 | fi | |
368 | mv new Makefile.in | |
369 | fi | |
370 | ||
2f9bfdfa SG |
371 | if ( echo $* | grep keep\-gm > /dev/null ) ; then |
372 | for i in * ; do | |
373 | if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then | |
374 | if [ -n "${verbose}" ] ; then | |
375 | echo Keeping gm stuff in $i | |
376 | fi | |
377 | fi | |
378 | done | |
379 | else | |
380 | for i in * ; do | |
381 | if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then | |
382 | if [ -n "${verbose}" ] ; then | |
383 | echo Removing traces of \"gm\" from $i... | |
384 | fi | |
385 | cp $i new | |
386 | sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new | |
387 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
388 | if [ -n "${verbose}" ] ; then | |
389 | echo Caching $i in .Recover... | |
390 | fi | |
391 | mv $i .Recover | |
392 | fi | |
393 | mv new $i | |
394 | fi | |
395 | done | |
396 | fi | |
397 | ||
3b0fb9c9 KR |
398 | # Do this check LAST! |
399 | for i in * ; do | |
400 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
401 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
402 | exit 1 | |
403 | fi | |
404 | done | |
405 | ||
57d32184 | 406 | # eof |