1 ########################
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.
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.
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
30 ########################
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.
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
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.
49 keep_these_too="${keep_these_too} .cvsignore autoconf automake
51 bfd binutils bison byacc cvs deja-gnu dejagnu diff dosrel dvips
52 emacs emacs19 examples expect fileutils findutils flex
53 gas gawk gcc gdb gdbm gdbtest glob gperf gprof grep grez groff
55 include inet install-sh ispell
56 ld less libgcc libgloss libiberty libio
58 m4 make mkinstalldirs mmalloc move-if-change newlib ncurses opcodes
60 rcs readline sed send-pr shellutils sim tar textutils time
61 texinfo tgas utils uudecode wdiff xiberty
62 configure.bat makeall.bat setup.com makefile.vms winsup
63 mpw-README mpw-configure mpw-config.in mpw-build.in mpw-install
64 ltconfig ltmain.sh missing ylwrap"
66 lose_these_too="${lose_these_too} libg++ librx testsuite"
68 cygnus_files="release release-info build-all.mk test-build.mk CYGNUS COPYING.NEWLIB"
70 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
71 keep_these_too="${keep_these_too} ${cygnus_files}"
73 lose_these_too="${lose_these_too} ${cygnus_files}"
76 gdbtk_files="tcl tk itcl tix libgui"
78 if ( echo $* | grep lose\-gdbtk > /dev/null) ; then
79 lose_these_too="${lose_these_too} ${gdbtk_files}"
80 if [ -n "${verbose}" ] ; then
81 echo Deleting ${gdbtk_files}
84 keep_these_too="${keep_these_too} ${gdbtk_files}"
85 if [ -n "${verbose}" ] ; then
86 echo Keeping ${gdbtk_files}
90 # This is for newlib net releases.
91 newlib_file="COPYING.NEWLIB"
93 if (echo $* | grep keep\-newlib > /dev/null) ; then
94 if (echo $* | grep -v keep\-cygnus > /dev/null) ; then
95 keep_these_too="${keep_these_too} ${newlib_file}"
96 lose_these_too="`echo ${lose_these_too} | sed -e s/${newlib_file}//`"
99 true; # Let keep-cygnus handle it.
102 # IDK releases don't include files which only matter to CDK.
103 inet_files="COPYING.LIB config config-ml.in etc symlink-tree"
105 if (echo $* | grep keep\-inet > /dev/null); then
106 lose_these_too="${lose_these_too} ${inet_files}"
108 keep_these_too="${keep_these_too} ${inet_files}"
111 ide_files="libide libidetcl vmake jstools"
113 if (echo $* | grep keep\-ide > /dev/null); then
114 keep_these_too="${keep_these_too} ${ide_files}"
115 test -n "$verbose" && echo Keeping ${ide_files}
117 lose_these_too="${lose_these_too} ${ide_files}"
121 # It is not yet clear if the cgen package will be shipped with the
125 if (echo $* | grep keep\-cgen > /dev/null); then
126 keep_these_too="${keep_these_too} ${cgen_files}"
128 lose_these_too="${lose_these_too} ${cgen_files}"
131 # This top-level directory is special. We often check out only subsets
132 # of this directory, and complaining about directories or files we didn't
133 # check out just gets obnoxious.
135 list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`"
138 for file in $list ; do
139 if [ -r $file ] || [ -d $file ] ; then
140 keep_these_too="${keep_these_too} $file"
144 list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` "
147 for file in $list ; do
148 if [ -r $file ] || [ -d $file ] ; then
149 lose_these_too="${lose_these_too} $file"
153 # All files listed between the "Things-to-keep:" line and the
154 # "Do-last:" line will be kept. All other files will be removed.
155 # Directories listed in this section will have their own Sanitize
156 # called. Directories not listed will be removed in their entirety
172 # Not sure we want to include mkdep in releases yet.
175 # The lines between the "Do-last:" line and the end of the file
176 # are executed as a /bin/sh shell script after everything else is
181 # Don't try to clean directories here, as the 'mv' command will fail.
182 # Also, grep fails on NFS mounted directories.
184 if ( echo $* | egrep verbose > /dev/null ) ; then
190 # Remove "sanitize-Sanitize" lines.
191 if [ -n "${verbose}" ] ; then
192 echo Cleaning unconditional sanitizations out of Makefile.in...
195 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
196 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
197 mv Makefile.in .Recover
201 if [ -n "${verbose}" ] ; then
202 echo Thawing away the \"chill\"...
205 if ( echo $* | grep keep\-chill > /dev/null ) ; then
207 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
208 if [ -n "${verbose}" ] ; then
209 echo Keeping chill stuff in $i
215 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
216 if [ -n "${verbose}" ] ; then
217 echo Thawing the \"chill\" out of $i...
220 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
221 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
222 if [ -n "${verbose}" ] ; then
223 echo Caching $i in .Recover...
232 if [ -n "${verbose}" ] ; then
233 echo Processing \"d30v\"...
236 d30v_files="ChangeLog config.sub configure.in"
238 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
239 for i in $d30v_files ; do
240 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
241 if [ -n "${verbose}" ] ; then
242 echo Keeping d30v stuff in $i
248 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
249 if [ -n "${verbose}" ] ; then
250 echo Removing traces of \"d30v\" from $i...
253 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
254 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
255 if [ -n "${verbose}" ] ; then
256 echo Caching $i in .Recover...
265 if [ -n "${verbose}" ] ; then
266 echo Processing \"v850\"...
269 v850_files="ChangeLog config.sub configure.in"
271 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
272 for i in $v850_files ; do
273 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
274 if [ -n "${verbose}" ] ; then
275 echo Keeping v850e stuff in $i
281 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
282 if [ -n "${verbose}" ] ; then
283 echo Removing traces of \"v850e\" from $i...
286 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
287 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
288 if [ -n "${verbose}" ] ; then
289 echo Caching $i in .Recover...
298 r5900_files="ChangeLog config.sub configure.in"
300 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
301 for i in $r5900_files ; do
302 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
303 if [ -n "${verbose}" ] ; then
304 echo Keeping r5900 stuff in $i
310 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
311 if [ -n "${verbose}" ] ; then
312 echo Removing traces of \"r5900\" from $i...
315 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
316 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
317 if [ -n "${verbose}" ] ; then
318 echo Caching $i in .Recover...
327 vr4320_files="ChangeLog config.sub"
329 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
330 for i in $vr4320_files ; do
331 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
332 if [ -n "${verbose}" ] ; then
333 echo Keeping vr4320 stuff in $i
339 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
340 if [ -n "${verbose}" ] ; then
341 echo Removing traces of \"vr4320\" from $i...
344 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
345 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
346 if [ -n "${verbose}" ] ; then
347 echo Caching $i in .Recover...
356 tx19_files="ChangeLog config.sub"
358 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
359 for i in $tx19_files ; do
360 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
361 if [ -n "${verbose}" ] ; then
362 echo Keeping tx19 stuff in $i
368 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
369 if [ -n "${verbose}" ] ; then
370 echo Removing traces of \"tx19\" from $i...
373 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
374 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
375 if [ -n "${verbose}" ] ; then
376 echo Caching $i in .Recover...
385 tx49_files="ChangeLog config.sub"
387 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
388 for i in $tx49_files ; do
389 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
390 if [ -n "${verbose}" ] ; then
391 echo Keeping tx49 stuff in $i
397 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
398 if [ -n "${verbose}" ] ; then
399 echo Removing traces of \"tx49\" from $i...
402 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
403 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
404 if [ -n "${verbose}" ] ; then
405 echo Caching $i in .Recover...
414 tic80_files="ChangeLog config.sub configure.in"
416 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
417 for i in $tic80_files ; do
418 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
419 if [ -n "${verbose}" ] ; then
420 echo Keeping tic80 stuff in $i
426 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
427 if [ -n "${verbose}" ] ; then
428 echo Removing traces of \"tic80\" from $i...
431 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
432 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
433 if [ -n "${verbose}" ] ; then
434 echo Caching $i in .Recover...
443 sky_files="ChangeLog config.sub configure.in"
445 if ( echo $* | grep keep\-sky > /dev/null ) ; then
446 for i in $sky_files ; do
447 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
448 if [ -n "${verbose}" ] ; then
449 echo Keeping sky stuff in $i
455 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
456 if [ -n "${verbose}" ] ; then
457 echo Removing traces of \"sky\" from $i...
460 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
461 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
462 if [ -n "${verbose}" ] ; then
463 echo Caching $i in .Recover...
472 if ( echo $* | grep keep\-ide > /dev/null ) ; then
474 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
475 if [ -n "${verbose}" ] ; then
476 echo Keeping ide stuff in $i
482 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
483 if [ -n "${verbose}" ] ; then
484 echo Removing traces of \"ide\" from $i...
487 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
488 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
489 if [ -n "${verbose}" ] ; then
490 echo Caching $i in .Recover...
499 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
500 if [ -n "${verbose}" ] ; then
501 echo Catering to RMS by removing traces of \"gdbtk\"...
504 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
505 if [ -n "${verbose}" ] ; then
506 echo Removing traces of \"gdbtk\" from $i...
509 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
510 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
511 if [ -n "${verbose}" ] ; then
512 echo Caching $i in .Recover...
520 sed -e '/GDBTK_SUPPORT_DIRS=/d' -e 's/ $(GDBTK_SUPPORT_DIRS)//' < Makefile.in > new
521 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
522 if [ -n "${verbose}" ] ; then
523 echo Caching Makefile.in in .Recover...
525 mv Makefile.in .Recover
529 if [ -n "${verbose}" ] ; then
530 echo Leaving \"gdbtk\" in the sources...
533 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
534 if [ -n "${verbose}" ] ; then
535 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
538 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
539 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
540 if [ -n "${verbose}" ] ; then
541 echo Caching $i in .Recover...
550 if ( echo $* | grep lose\-mswin > /dev/null ) ; then
551 if [ -n "${verbose}" ] ; then
552 echo Removing traces of \"mswin\"...
555 if test ! -d $i && (grep sanitize-mswin $i > /dev/null) ; then
556 if [ -n "${verbose}" ] ; then
557 echo Removing traces of \"mswin\" from $i...
560 sed '/start\-sanitize\-mswin/,/end-\sanitize\-mswin/d' < $i > new
561 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
562 if [ -n "${verbose}" ] ; then
563 echo Caching $i in .Recover...
571 if [ -n "${verbose}" ] ; then
572 echo Leaving \"mswin\" in the sources...
575 if test ! -d $i && (grep sanitize-mswin $i > /dev/null) ; then
576 if [ -n "${verbose}" ] ; then
577 echo Keeping \"mswin\" stuff in $i, but editing out sanitize lines...
580 sed -e '/start\-sanitize\-mswin/d' -e '/end\-sanitize\-mswin/d' < $i > new
581 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
582 if [ -n "${verbose}" ] ; then
583 echo Caching $i in .Recover...
592 vr5400_files="ChangeLog config.sub"
594 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
595 for i in $vr5400_files ; do
596 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
597 if [ -n "${verbose}" ] ; then
598 echo Keeping vr5400 stuff in $i
604 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
605 if [ -n "${verbose}" ] ; then
606 echo Removing traces of \"vr5400\" from $i...
609 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
610 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
611 if [ -n "${verbose}" ] ; then
612 echo Caching $i in .Recover...
621 m32rx_files="ChangeLog config-ml.in"
622 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
623 for i in $m32rx_files ; do
624 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
625 if [ -n "${verbose}" ] ; then
626 echo Keeping m32rx stuff in $i
632 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
633 if [ -n "${verbose}" ] ; then
634 echo Removing traces of \"m32rx\" from $i...
637 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new
638 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
639 if [ -n "${verbose}" ] ; then
640 echo Caching $i in .Recover...
649 kcygnus_files="configure"
650 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
651 for i in $kcygnus_files ; do
652 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
653 if [ -n "${verbose}" ] ; then
654 echo Keeping Cygnus stuff in $i
657 grep -v sanitize-cygnus $i > new
658 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
659 if [ -n "${verbose}" ] ; then
660 echo Caching $i in .Recover...
669 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
670 if [ -n "${verbose}" ] ; then
671 echo Removing traces of \"cygnus\" from $i...
674 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
675 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
676 if [ -n "${verbose}" ] ; then
677 echo Caching $i in .Recover...
687 # Do this check LAST!
689 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
690 echo '***' Some mentions of Sanitize are still left in $i! 1>&2