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 | ||
126 | Things-to-keep: | |
127 | ||
6e37b215 PB |
128 | COPYING |
129 | COPYING.LIB | |
57d32184 | 130 | ChangeLog |
a93b3c77 | 131 | Makefile.in |
965a9f14 | 132 | README |
a93b3c77 | 133 | config |
d747cac4 | 134 | config-ml.in |
5cc24596 | 135 | config.guess |
db2de419 | 136 | config.sub |
a93b3c77 RP |
137 | configure |
138 | configure.in | |
701df845 | 139 | etc |
d747cac4 | 140 | symlink-tree |
a93b3c77 | 141 | |
87756e15 RP |
142 | Things-to-lose: |
143 | ||
43e36dd2 RP |
144 | # The lines between the "Do-last:" line and the end of the file |
145 | # are executed as a /bin/sh shell script after everything else is | |
146 | # done. | |
147 | ||
a93b3c77 RP |
148 | Do-last: |
149 | ||
bf150019 DE |
150 | # Don't try to clean directories here, as the 'mv' command will fail. |
151 | # Also, grep fails on NFS mounted directories. | |
152 | ||
7b85349f RP |
153 | if ( echo $* | egrep verbose > /dev/null ) ; then |
154 | verbose=true | |
155 | else | |
156 | verbose= | |
157 | fi | |
158 | ||
eecef7ef FF |
159 | # Remove "sanitize-Sanitize" lines. |
160 | if [ -n "${verbose}" ] ; then | |
161 | echo Cleaning unconditional sanitizations out of Makefile.in... | |
162 | fi | |
163 | cp Makefile.in new | |
164 | sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new | |
165 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
166 | mv Makefile.in .Recover | |
167 | fi | |
168 | mv new Makefile.in | |
169 | ||
7b85349f RP |
170 | if [ -n "${verbose}" ] ; then |
171 | echo Thawing away the \"chill\"... | |
172 | fi | |
5d4ec851 | 173 | |
5d4ec851 FF |
174 | if ( echo $* | grep keep\-chill > /dev/null ) ; then |
175 | for i in * ; do | |
176 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
177 | if [ -n "${verbose}" ] ; then |
178 | echo Keeping chill stuff in $i | |
179 | fi | |
5d4ec851 FF |
180 | fi |
181 | done | |
182 | else | |
183 | for i in * ; do | |
184 | if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then | |
7b85349f RP |
185 | if [ -n "${verbose}" ] ; then |
186 | echo Thawing the \"chill\" out of $i... | |
187 | fi | |
5d4ec851 FF |
188 | cp $i new |
189 | sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new | |
190 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7b85349f RP |
191 | if [ -n "${verbose}" ] ; then |
192 | echo Caching $i in .Recover... | |
193 | fi | |
5d4ec851 FF |
194 | mv $i .Recover |
195 | fi | |
196 | mv new $i | |
197 | fi | |
198 | done | |
5d4ec851 FF |
199 | fi |
200 | ||
86118528 KR |
201 | if [ -n "${verbose}" ] ; then |
202 | echo Processing \"arc\"... | |
203 | fi | |
204 | ||
a6cb89ff | 205 | arc_files="config.sub configure.in config-ml.in" |
bf150019 | 206 | |
86118528 | 207 | if ( echo $* | grep keep\-arc > /dev/null ) ; then |
bf150019 | 208 | for i in $arc_files ; do |
86118528 KR |
209 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then |
210 | if [ -n "${verbose}" ] ; then | |
211 | echo Keeping arc stuff in $i | |
212 | fi | |
213 | fi | |
214 | done | |
215 | else | |
216 | for i in * ; do | |
217 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
218 | if [ -n "${verbose}" ] ; then | |
219 | echo Removing traces of \"arc\" from $i... | |
220 | fi | |
221 | cp $i new | |
222 | sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new | |
bf150019 DE |
223 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
224 | if [ -n "${verbose}" ] ; then | |
225 | echo Caching $i in .Recover... | |
226 | fi | |
227 | mv $i .Recover | |
228 | fi | |
229 | mv new $i | |
230 | fi | |
231 | done | |
232 | fi | |
233 | ||
dee64d72 DE |
234 | if [ -n "${verbose}" ] ; then |
235 | echo Processing \"jaguar\"... | |
236 | fi | |
237 | ||
a6cb89ff | 238 | jaguar_files="config.sub configure.in config-ml.in" |
dee64d72 DE |
239 | |
240 | if ( echo $* | grep keep\-jaguar > /dev/null ) ; then | |
241 | for i in $jaguar_files ; do | |
242 | if test ! -d $i && (grep sanitize-jaguar $i > /dev/null) ; then | |
243 | if [ -n "${verbose}" ] ; then | |
244 | echo Keeping jaguar stuff in $i | |
245 | fi | |
246 | fi | |
247 | done | |
248 | else | |
249 | for i in * ; do | |
250 | if test ! -d $i && (grep sanitize-jaguar $i > /dev/null) ; then | |
251 | if [ -n "${verbose}" ] ; then | |
252 | echo Removing traces of \"jaguar\" from $i... | |
253 | fi | |
254 | cp $i new | |
255 | sed '/start\-sanitize\-jaguar/,/end-\sanitize\-jaguar/d' < $i > new | |
256 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
257 | if [ -n "${verbose}" ] ; then | |
258 | echo Caching $i in .Recover... | |
259 | fi | |
260 | mv $i .Recover | |
261 | fi | |
262 | mv new $i | |
263 | fi | |
264 | done | |
265 | fi | |
266 | ||
bf150019 DE |
267 | psion_files="config.sub configure.in" |
268 | ||
269 | if ( echo $* | grep keep\-psion > /dev/null ) ; then | |
270 | for i in $psion_files; do | |
271 | if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then | |
272 | if [ -n "${verbose}" ] ; then | |
273 | echo Keeping psion stuff in $i | |
274 | fi | |
275 | fi | |
276 | done | |
277 | else | |
278 | for i in * ; do | |
279 | if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then | |
280 | if [ -n "${verbose}" ] ; then | |
281 | echo Removing traces of \"psion\" from $i... | |
282 | fi | |
283 | cp $i new | |
284 | sed '/start\-sanitize\-psion/,/end-\sanitize\-psion/d' < $i > new | |
86118528 KR |
285 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
286 | if [ -n "${verbose}" ] ; then | |
287 | echo Caching $i in .Recover... | |
288 | fi | |
289 | mv $i .Recover | |
290 | fi | |
291 | mv new $i | |
292 | fi | |
293 | done | |
294 | fi | |
295 | ||
03c4ce2f | 296 | rce_files="config.sub" |
5c680afd | 297 | |
03c4ce2f MT |
298 | if ( echo $* | grep keep\-rce > /dev/null ) ; then |
299 | for i in $rce_files ; do | |
300 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 301 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 302 | echo Keeping rce stuff in $i |
5c680afd MT |
303 | fi |
304 | fi | |
305 | done | |
306 | else | |
03c4ce2f MT |
307 | for i in $rce_files ; do |
308 | if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then | |
5c680afd | 309 | if [ -n "${verbose}" ] ; then |
03c4ce2f | 310 | echo Removing traces of \"rce\" from $i... |
5c680afd MT |
311 | fi |
312 | cp $i new | |
03c4ce2f | 313 | sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new |
5c680afd MT |
314 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
315 | if [ -n "${verbose}" ] ; then | |
316 | echo Caching $i in .Recover... | |
317 | fi | |
318 | mv $i .Recover | |
319 | fi | |
320 | mv new $i | |
321 | fi | |
322 | done | |
323 | fi | |
324 | ||
a6cb89ff | 325 | sh3e_files="ChangeLog config-ml.in" |
bc55a53f C |
326 | if ( echo $* | grep keep\-sh3e > /dev/null ) ; then |
327 | for i in $sh3e_files ; do | |
328 | if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then | |
329 | if [ -n "${verbose}" ] ; then | |
330 | echo Keeping sh3e stuff in $i | |
331 | fi | |
332 | fi | |
333 | done | |
334 | else | |
335 | for i in $sh3e_files ; do | |
336 | if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then | |
337 | if [ -n "${verbose}" ] ; then | |
338 | echo Removing traces of \"sh3e\" from $i... | |
339 | fi | |
340 | cp $i new | |
341 | sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/d' < $i > new | |
342 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
343 | if [ -n "${verbose}" ] ; then | |
344 | echo Caching $i in .Recover... | |
345 | fi | |
346 | mv $i .Recover | |
347 | fi | |
348 | mv new $i | |
349 | fi | |
350 | done | |
351 | fi | |
352 | ||
353 | ||
aa800755 FF |
354 | if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then |
355 | echo Catering to RMS by removing traces of \"gdbtk\"... | |
356 | if [ -n "${verbose}" ] ; then | |
357 | echo Removing traces of \"gdbtk\" from Makefile.in... | |
358 | fi | |
359 | cp Makefile.in new | |
360 | sed -e '/GDBTK_SUPPORT_DIRS=/d' -e 's/ $(GDBTK_SUPPORT_DIRS)//' < Makefile.in > new | |
361 | if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then | |
362 | if [ -n "${verbose}" ] ; then | |
363 | echo Caching Makefile.in in .Recover... | |
364 | fi | |
365 | mv Makefile.in .Recover | |
366 | fi | |
367 | mv new Makefile.in | |
368 | fi | |
369 | ||
2f9bfdfa SG |
370 | if ( echo $* | grep keep\-gm > /dev/null ) ; then |
371 | for i in * ; do | |
372 | if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then | |
373 | if [ -n "${verbose}" ] ; then | |
374 | echo Keeping gm stuff in $i | |
375 | fi | |
376 | fi | |
377 | done | |
378 | else | |
379 | for i in * ; do | |
380 | if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then | |
381 | if [ -n "${verbose}" ] ; then | |
382 | echo Removing traces of \"gm\" from $i... | |
383 | fi | |
384 | cp $i new | |
385 | sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new | |
386 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
387 | if [ -n "${verbose}" ] ; then | |
388 | echo Caching $i in .Recover... | |
389 | fi | |
390 | mv $i .Recover | |
391 | fi | |
392 | mv new $i | |
393 | fi | |
394 | done | |
395 | fi | |
396 | ||
3b0fb9c9 KR |
397 | # Do this check LAST! |
398 | for i in * ; do | |
399 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
400 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
401 | exit 1 | |
402 | fi | |
403 | done | |
404 | ||
57d32184 | 405 | # eof |