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