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
50 apache ash bash bfd binutils bison bsp byacc bzip2
51 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 intl ispell
56 ld less libgcc libgloss libiberty libio
57 libstdc++ libtermcap libtool
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 libdsp 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}"
120 flexlm_files="flexlm"
122 if (echo $* | grep keep\-cygnus > /dev/null); then
123 keep_these_too="${keep_these_too} ${flexlm_files}"
124 test -n "$verbose" && echo Keeping ${flexlm_files}
126 lose_these_too="${lose_these_too} ${flexlm_files}"
130 # It is not yet clear if the cgen package will be shipped with the
134 if (echo $* | grep keep\-cgen > /dev/null); then
135 keep_these_too="${keep_these_too} ${cgen_files}"
137 lose_these_too="${lose_these_too} ${cgen_files}"
141 java_files="boehm-gc libjava qthreads zip"
143 if (echo $* | grep keep\-java > /dev/null); then
144 keep_these_too="${keep_these_too} ${java_files}"
146 lose_these_too="${lose_these_too} ${java_files}"
149 # This top-level directory is special. We often check out only subsets
150 # of this directory, and complaining about directories or files we didn't
151 # check out just gets obnoxious.
153 list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`"
156 for file in $list ; do
157 if [ -r $file ] || [ -d $file ] ; then
158 keep_these_too="${keep_these_too} $file"
162 list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` "
165 for file in $list ; do
166 if [ -r $file ] || [ -d $file ] ; then
167 lose_these_too="${lose_these_too} $file"
171 # All files listed between the "Things-to-keep:" line and the
172 # "Do-last:" line will be kept. All other files will be removed.
173 # Directories listed in this section will have their own Sanitize
174 # called. Directories not listed will be removed in their entirety
191 # Not sure we want to include mkdep in releases yet.
194 # The lines between the "Do-last:" line and the end of the file
195 # are executed as a /bin/sh shell script after everything else is
200 # Don't try to clean directories here, as the 'mv' command will fail.
201 # Also, grep fails on NFS mounted directories.
203 if ( echo $* | egrep verbose > /dev/null ) ; then
209 # Remove "sanitize-Sanitize" lines.
210 if [ -n "${verbose}" ] ; then
211 echo Cleaning unconditional sanitizations out of Makefile.in...
214 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
215 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
216 mv Makefile.in .Recover
220 if [ -n "${verbose}" ] ; then
221 echo Thawing away the \"chill\"...
224 if ( echo $* | grep keep\-chill > /dev/null ) ; then
226 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
227 if [ -n "${verbose}" ] ; then
228 echo Keeping chill stuff in $i
234 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
235 if [ -n "${verbose}" ] ; then
236 echo Thawing the \"chill\" out of $i...
239 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
240 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
241 if [ -n "${verbose}" ] ; then
242 echo Caching $i in .Recover...
251 r5900_files="ChangeLog config.sub configure.in"
253 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
254 for i in $r5900_files ; do
255 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
256 if [ -n "${verbose}" ] ; then
257 echo Keeping r5900 stuff in $i
263 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
264 if [ -n "${verbose}" ] ; then
265 echo Removing traces of \"r5900\" from $i...
268 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
269 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
270 if [ -n "${verbose}" ] ; then
271 echo Caching $i in .Recover...
280 vr4xxx_files="ChangeLog config.sub"
282 if ( echo $* | grep keep\-vr4xxx > /dev/null ) ; then
283 for i in $vr4xxx_files ; do
284 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
285 if [ -n "${verbose}" ] ; then
286 echo Keeping vr4xxx stuff in $i
292 if test ! -d $i && (grep sanitize-vr4xxx $i > /dev/null) ; then
293 if [ -n "${verbose}" ] ; then
294 echo Removing traces of \"vr4xxx\" from $i...
297 sed '/start\-sanitize\-vr4xxx/,/end-\sanitize\-vr4xxx/d' < $i > new
298 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
299 if [ -n "${verbose}" ] ; then
300 echo Caching $i in .Recover...
309 vr4320_files="ChangeLog config.sub"
311 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
312 for i in $vr4320_files ; do
313 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
314 if [ -n "${verbose}" ] ; then
315 echo Keeping vr4320 stuff in $i
321 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
322 if [ -n "${verbose}" ] ; then
323 echo Removing traces of \"vr4320\" from $i...
326 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
327 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
328 if [ -n "${verbose}" ] ; then
329 echo Caching $i in .Recover...
338 tx19_files="ChangeLog config.sub"
340 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
341 for i in $tx19_files ; do
342 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
343 if [ -n "${verbose}" ] ; then
344 echo Keeping tx19 stuff in $i
350 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
351 if [ -n "${verbose}" ] ; then
352 echo Removing traces of \"tx19\" from $i...
355 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
356 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
357 if [ -n "${verbose}" ] ; then
358 echo Caching $i in .Recover...
367 tx49_files="ChangeLog config.sub"
369 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
370 for i in $tx49_files ; do
371 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
372 if [ -n "${verbose}" ] ; then
373 echo Keeping tx49 stuff in $i
379 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
380 if [ -n "${verbose}" ] ; then
381 echo Removing traces of \"tx49\" from $i...
384 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
385 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
386 if [ -n "${verbose}" ] ; then
387 echo Caching $i in .Recover...
396 tic80_files="ChangeLog config.sub configure.in"
398 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
399 for i in $tic80_files ; do
400 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
401 if [ -n "${verbose}" ] ; then
402 echo Keeping tic80 stuff in $i
408 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
409 if [ -n "${verbose}" ] ; then
410 echo Removing traces of \"tic80\" from $i...
413 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
414 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
415 if [ -n "${verbose}" ] ; then
416 echo Caching $i in .Recover...
425 sky_files="ChangeLog config.sub configure.in"
427 if ( echo $* | grep keep\-sky > /dev/null ) ; then
428 for i in $sky_files ; do
429 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
430 if [ -n "${verbose}" ] ; then
431 echo Keeping sky stuff in $i
437 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
438 if [ -n "${verbose}" ] ; then
439 echo Removing traces of \"sky\" from $i...
442 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
443 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
444 if [ -n "${verbose}" ] ; then
445 echo Caching $i in .Recover...
454 if ( echo $* | grep keep\-ide > /dev/null ) ; then
456 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
457 if [ -n "${verbose}" ] ; then
458 echo Keeping ide stuff in $i
464 if test ! -d $i && (grep sanitize-ide $i > /dev/null) ; then
465 if [ -n "${verbose}" ] ; then
466 echo Removing traces of \"ide\" from $i...
469 sed '/start\-sanitize\-ide/,/end-\sanitize\-ide/d' < $i > new
470 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
471 if [ -n "${verbose}" ] ; then
472 echo Caching $i in .Recover...
481 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
482 if [ -n "${verbose}" ] ; then
483 echo Catering to RMS by removing traces of \"gdbtk\"...
486 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
487 if [ -n "${verbose}" ] ; then
488 echo Removing traces of \"gdbtk\" from $i...
491 sed '/start\-sanitize\-gdbtk/,/end-\sanitize\-gdbtk/d' < $i > new
492 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
493 if [ -n "${verbose}" ] ; then
494 echo Caching $i in .Recover...
502 sed -e '/GDBTK_SUPPORT_DIRS=/d' -e 's/ $(GDBTK_SUPPORT_DIRS)//' < Makefile.in > new
503 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
504 if [ -n "${verbose}" ] ; then
505 echo Caching Makefile.in in .Recover...
507 mv Makefile.in .Recover
511 if [ -n "${verbose}" ] ; then
512 echo Leaving \"gdbtk\" in the sources...
515 if test ! -d $i && (grep sanitize-gdbtk $i > /dev/null) ; then
516 if [ -n "${verbose}" ] ; then
517 echo Keeping \"gdbtk\" stuff in $i, but editing out sanitize lines...
520 sed -e '/start\-sanitize\-gdbtk/d' -e '/end\-sanitize\-gdbtk/d' < $i > new
521 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
522 if [ -n "${verbose}" ] ; then
523 echo Caching $i in .Recover...
532 if ( echo $* | grep lose\-mswin > /dev/null ) ; then
533 if [ -n "${verbose}" ] ; then
534 echo Removing traces of \"mswin\"...
537 if test ! -d $i && (grep sanitize-mswin $i > /dev/null) ; then
538 if [ -n "${verbose}" ] ; then
539 echo Removing traces of \"mswin\" from $i...
542 sed '/start\-sanitize\-mswin/,/end-\sanitize\-mswin/d' < $i > new
543 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
544 if [ -n "${verbose}" ] ; then
545 echo Caching $i in .Recover...
553 if [ -n "${verbose}" ] ; then
554 echo Leaving \"mswin\" in the sources...
557 if test ! -d $i && (grep sanitize-mswin $i > /dev/null) ; then
558 if [ -n "${verbose}" ] ; then
559 echo Keeping \"mswin\" stuff in $i, but editing out sanitize lines...
562 sed -e '/start\-sanitize\-mswin/d' -e '/end\-sanitize\-mswin/d' < $i > new
563 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
564 if [ -n "${verbose}" ] ; then
565 echo Caching $i in .Recover...
574 cygnus_files="ChangeLog config.sub config-ml.in"
576 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
577 for i in $cygnus_files ; do
578 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
579 if [ -n "${verbose}" ] ; then
580 echo Keeping cygnus stuff in $i
586 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
587 if [ -n "${verbose}" ] ; then
588 echo Removing traces of \"cygnus\" from $i...
591 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
592 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
593 if [ -n "${verbose}" ] ; then
594 echo Caching $i in .Recover...
603 java_files="ChangeLog Makefile.in configure.in"
604 if ( echo $* | grep keep\-java > /dev/null ) ; then
605 for i in $java_files ; do
606 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
607 if [ -n "${verbose}" ] ; then
608 echo Keeping java stuff in $i
614 if test ! -d $i && (grep sanitize-java $i > /dev/null) ; then
615 if [ -n "${verbose}" ] ; then
616 echo Removing traces of \"java\" from $i...
619 sed '/start\-sanitize\-java/,/end-\sanitize\-java/d' < $i > new
620 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
621 if [ -n "${verbose}" ] ; then
622 echo Caching $i in .Recover...
631 dsp_files="ChangeLog Makefile.in configure.in"
632 if ( echo $* | grep keep\-dsp > /dev/null ) ; then
633 for i in $dsp_files ; do
634 if test ! -d $i && (grep sanitize-dsp $i > /dev/null) ; then
635 if [ -n "${verbose}" ] ; then
636 echo Keeping dsp stuff in $i
642 if test ! -d $i && (grep sanitize-dsp $i > /dev/null) ; then
643 if [ -n "${verbose}" ] ; then
644 echo Removing traces of \"dsp\" from $i...
647 sed '/start\-sanitize\-dsp/,/end-\sanitize\-dsp/d' < $i > new
648 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
649 if [ -n "${verbose}" ] ; then
650 echo Caching $i in .Recover...
660 beos_files="ChangeLog configure.in"
661 if ( echo $* | grep keep\-beos > /dev/null ) ; then
662 for i in $beos_files ; do
663 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
664 if [ -n "${verbose}" ] ; then
665 echo Keeping beos stuff in $i
671 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
672 if [ -n "${verbose}" ] ; then
673 echo Removing traces of \"beos\" from $i...
676 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/d' < $i > new
677 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
678 if [ -n "${verbose}" ] ; then
679 echo Caching $i in .Recover...
688 kcygnus_files="ChangeLog configure configure.in Makefile.in"
689 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
690 for i in $kcygnus_files ; do
691 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
692 if [ -n "${verbose}" ] ; then
693 echo Keeping Cygnus stuff in $i
696 grep -v sanitize-cygnus $i > new
697 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
698 if [ -n "${verbose}" ] ; then
699 echo Caching $i in .Recover...
708 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
709 if [ -n "${verbose}" ] ; then
710 echo Removing traces of \"cygnus\" from $i...
713 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
714 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
715 if [ -n "${verbose}" ] ; then
716 echo Caching $i in .Recover...
726 # Do this check LAST!
728 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
729 echo '***' Some mentions of Sanitize are still left in $i! 1>&2