1 # .Sanitize for devo/gas
3 # Each directory to survive its way into a release will need a file
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.
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
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
14 # done in this directory.
19 for d in obsolete regress regress.m68k testscripts ; do
21 lose_these_too="${lose_these_too} $d"
25 # All files listed between the "Things-to-keep:" line and the
26 # "Do-last:" line will be kept. All other files will be removed.
27 # Directories listed in this section will have their own Sanitize
28 # called. Directories not listed will be removed in their entirety
127 # The lines between the "Do-last:" line and the end of the file
128 # are executed as a /bin/sh shell script after everything else is
133 v850_files="ChangeLog ChangeLog-9697 configure.in configure"
134 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
135 for i in $v850_files ; do
136 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
137 if [ -n "${verbose}" ] ; then
138 echo Keeping v850e stuff in $i
143 for i in $v850_files ; do
144 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Removing traces of \"v850e\" from $i...
149 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
150 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
151 if [ -n "${verbose}" ] ; then
152 echo Caching $i in .Recover...
161 r5900_files="ChangeLog ChangeLog-9697 configure configure.in"
162 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
163 for i in $r5900_files ; do
164 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
165 if [ -n "${verbose}" ] ; then
166 echo Keeping r5900 stuff in $i
171 for i in $r5900_files ; do
172 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
173 if [ -n "${verbose}" ] ; then
174 echo Removing traces of \"r5900\" from $i...
177 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
178 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
179 if [ -n "${verbose}" ] ; then
180 echo Caching $i in .Recover...
189 vr5400_files="ChangeLog ChangeLog-9697"
190 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
191 for i in $vr5400_files ; do
192 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
193 if [ -n "${verbose}" ] ; then
194 echo Keeping vr5400 stuff in $i
199 for i in $vr5400_files ; do
200 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
201 if [ -n "${verbose}" ] ; then
202 echo Removing traces of \"vr5400\" from $i...
205 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
206 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
207 if [ -n "${verbose}" ] ; then
208 echo Caching $i in .Recover...
217 tx19_files="ChangeLog ChangeLog-9697"
218 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
219 for i in $tx19_files ; do
220 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
221 if [ -n "${verbose}" ] ; then
222 echo Keeping tx19 stuff in $i
227 for i in $tx19_files ; do
228 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
229 if [ -n "${verbose}" ] ; then
230 echo Removing traces of \"tx19\" from $i...
233 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
234 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
235 if [ -n "${verbose}" ] ; then
236 echo Caching $i in .Recover...
245 tx49_files="ChangeLog ChangeLog-9697"
246 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
247 for i in $tx49_files ; do
248 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
249 if [ -n "${verbose}" ] ; then
250 echo Keeping tx49 stuff in $i
255 for i in $tx49_files ; do
256 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
257 if [ -n "${verbose}" ] ; then
258 echo Removing traces of \"tx49\" from $i...
261 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
262 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
263 if [ -n "${verbose}" ] ; then
264 echo Caching $i in .Recover...
273 tic80_files="ChangeLog ChangeLog-9697 configure.in configure"
274 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
275 for i in $tic80_files ; do
276 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
277 if [ -n "${verbose}" ] ; then
278 echo Keeping tic80 stuff in $i
283 for i in $tic80_files ; do
284 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
285 if [ -n "${verbose}" ] ; then
286 echo Removing traces of \"tic80\" from $i...
289 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
290 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
291 if [ -n "${verbose}" ] ; then
292 echo Caching $i in .Recover...
301 am33_files="ChangeLog"
302 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
303 for i in $am33_files ; do
304 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
305 if [ -n "${verbose}" ] ; then
306 echo Keeping am33 stuff in $i
311 for i in $am33_files ; do
312 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
313 if [ -n "${verbose}" ] ; then
314 echo Removing traces of \"am33\" from $i...
317 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
318 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
319 if [ -n "${verbose}" ] ; then
320 echo Caching $i in .Recover...
329 m32rx_files="ChangeLog ChangeLog-9697 configure.in configure"
330 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
331 for i in $m32rx_files ; do
332 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
333 if [ -n "${verbose}" ] ; then
334 echo Keeping m32rx stuff in $i
339 for i in $m32rx_files ; do
340 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
341 if [ -n "${verbose}" ] ; then
342 echo Removing traces of \"m32rx\" from $i...
345 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new
346 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
347 if [ -n "${verbose}" ] ; then
348 echo Caching $i in .Recover...
356 if ( echo $* | grep keep\-phase2\-m32rx > /dev/null ) ; then
357 for i in $m32rx_files ; do
358 if test ! -d $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
359 if [ -n "${verbose}" ] ; then
360 echo Keeping m32rx stuff in $i
365 for i in $m32rx_files ; do
366 if test -r $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
367 if [ -n "${verbose}" ] ; then
368 echo Removing traces of \"m32rx\" from $i...
371 sed '/start\-sanitize\-phase2\-m32rx/,/end\-sanitize\-phase2\-m32rx/d' < $i > new
372 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
373 if [ -n "${verbose}" ] ; then
374 echo Caching $i in .Recover...
383 sky_files="ChangeLog configure.in configure"
384 if ( echo $* | grep keep\-sky > /dev/null ) ; then
385 for i in $sky_files ; do
386 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
387 if [ -n "${verbose}" ] ; then
388 echo Keeping sky stuff in $i
393 for i in $sky_files ; do
394 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
395 if [ -n "${verbose}" ] ; then
396 echo Removing traces of \"sky\" from $i...
399 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
400 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
401 if [ -n "${verbose}" ] ; then
402 echo Caching $i in .Recover...
411 vr4320_files="ChangeLog"
412 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
413 for i in $vr4320_files ; do
414 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
415 if [ -n "${verbose}" ] ; then
416 echo Keeping vr4320 stuff in $i
421 for i in $vr4320_files ; do
422 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
423 if [ -n "${verbose}" ] ; then
424 echo Removing traces of \"vr4320\" from $i...
427 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
428 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
429 if [ -n "${verbose}" ] ; then
430 echo Caching $i in .Recover...
439 branchbug4011_files="ChangeLog"
440 if ( echo $* | grep keep\-branchbug4011 > /dev/null ) ; then
441 for i in $branchbug4011_files ; do
442 if test ! -d $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
443 if [ -n "${verbose}" ] ; then
444 echo Keeping branchbug4011 stuff in $i
449 for i in $branchbug4011_files ; do
450 if test -r $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
451 if [ -n "${verbose}" ] ; then
452 echo Removing traces of \"branchbug4011\" from $i...
455 sed '/start\-sanitize\-branchbug4011/,/end\-sanitize\-branchbug4011/d' < $i > new
456 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
457 if [ -n "${verbose}" ] ; then
458 echo Caching $i in .Recover...
467 beos_files="ChangeLog configure.in configure"
468 if ( echo $* | grep keep\-beos > /dev/null ) ; then
469 for i in $beos_files ; do
470 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
471 if [ -n "${verbose}" ] ; then
472 echo Keeping beos stuff in $i
477 for i in $beos_files ; do
478 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
479 if [ -n "${verbose}" ] ; then
480 echo Removing traces of \"beos\" from $i...
483 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/d' < $i > new
484 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
485 if [ -n "${verbose}" ] ; then
486 echo Caching $i in .Recover...
496 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
497 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
502 # This must come after all other sanitizations. Re-sanitize the .pot
504 if [ -n "${verbose}" ]; then
505 echo Re-computing files for gettext ...
508 if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
509 if [ -n "${verbose}" ]; then
510 echo Caching po/POTFILES.in in .Recover...
512 mv po/POTFILES.in po/.Recover
514 find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
516 if [ -n "${safe}" -a ! -f po/.Recover/gas.pot ]; then
517 if [ -n "${verbose}" ]; then
518 echo Caching po/gas.pot in .Recover...
520 mv po/gas.pot po/.Recover
522 # If this fails, Sanitization must fail.
523 xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/gas.pot || exit 1