* config/tc-a29k.c (line_separator_chars): Restore '@'. Existing
[deliverable/binutils-gdb.git] / .Sanitize
1 ########################
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 #
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.
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 #
30 ########################
31
32 # .Sanitize for devo.
33
34 # Each directory to survive its way into a release will need a file
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
45 # done in this directory.
46
47 Do-first:
48
49 keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf
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
53 libio librx libstdc++ m4 make mmalloc move-if-change newlib opcodes
54 pagas patch prms rcs readline sed send-pr shellutils sim textutils
55 texinfo tgas utils uudecode wdiff xiberty
56 configure.bat makeall.bat winsup
57 ctax gls goonix guile guile-docs libguile slib
58 mpw-README mpw-configure mpw-config.in mpw-build.in"
59
60 lose_these_too="${lose_these_too} testsuite"
61
62 cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB"
63
64 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
65 keep_these_too="${keep_these_too} ${cygnus_files}"
66 else
67 lose_these_too="${lose_these_too} ${cygnus_files}"
68 fi
69
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
82 fi
83
84 # This is for newlib net releases.
85 newlib_file="COPYING.NEWLIB"
86
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
92 else
93 true; # Let keep-cygnus handle it.
94 fi
95
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
100 list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`"
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
109 list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` "
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
118 # All files listed between the "Things-to-keep:" line and the
119 # "Do-last:" line will be kept. All other files will be removed.
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
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
127 Things-to-keep:
128
129 COPYING
130 COPYING.LIB
131 ChangeLog
132 Makefile.in
133 README
134 config
135 cfg-ml-com.in
136 cfg-ml-pos.in
137 config.guess
138 config.sub
139 configure
140 configure.in
141 etc
142
143 Things-to-lose:
144
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
149 Do-last:
150
151 # Don't try to clean directories here, as the 'mv' command will fail.
152 # Also, grep fails on NFS mounted directories.
153
154 if ( echo $* | egrep verbose > /dev/null ) ; then
155 verbose=true
156 else
157 verbose=
158 fi
159
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
171 if [ -n "${verbose}" ] ; then
172 echo Thawing away the \"chill\"...
173 fi
174
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
178 if [ -n "${verbose}" ] ; then
179 echo Keeping chill stuff in $i
180 fi
181 fi
182 done
183 else
184 for i in * ; do
185 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
186 if [ -n "${verbose}" ] ; then
187 echo Thawing the \"chill\" out of $i...
188 fi
189 cp $i new
190 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
191 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
192 if [ -n "${verbose}" ] ; then
193 echo Caching $i in .Recover...
194 fi
195 mv $i .Recover
196 fi
197 mv new $i
198 fi
199 done
200 fi
201
202 if [ -n "${verbose}" ] ; then
203 echo Processing \"arc\"...
204 fi
205
206 arc_files="config.sub configure.in cfg-ml-com.in"
207
208 if ( echo $* | grep keep\-arc > /dev/null ) ; then
209 for i in $arc_files ; do
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
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
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
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
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
297 rce_files="config.sub"
298
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
302 if [ -n "${verbose}" ] ; then
303 echo Keeping rce stuff in $i
304 fi
305 fi
306 done
307 else
308 for i in $rce_files ; do
309 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
310 if [ -n "${verbose}" ] ; then
311 echo Removing traces of \"rce\" from $i...
312 fi
313 cp $i new
314 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
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
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
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
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
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
406 # eof
This page took 0.037134 seconds and 4 git commands to generate.