3 ########################
5 # If you're about to add a file or directory which isn't checked out as part
6 # of every module in devo (e.g., if "cvs co gas+utils" won't get it, or if
7 # "cvs co gcc" won't get it), then don't, Don't, DON'T add it to the regular
8 # things-to-keep or things-to-lose sections. Instead, add it to the setting
9 # of keep_these_too or lose_these_too before those variables are rescanned
10 # to check for the existence of the items listed in them.
12 # Otherwise, somebody will check out some package that doesn't include your
13 # new file, and will get warnings from Sanitize when everything is really
14 # okay. You don't want to get people in the habit of ignoring complaints from
15 # Sanitize, do you? No, I didn't think so.
16 ########################
18 # Each directory to survive its way into a release will need a file
19 # like this one called "./.Sanitize". All keyword lines must exist,
20 # and must exist in the order specified by this file. Each directory
21 # in the tree will be processed, top down, in the following order.
23 # Hash started lines like this one are comments and will be deleted
24 # before anything else is done. Blank lines will also be squashed
27 # The lines between the "Do-first:" line and the "Things-to-keep:"
28 # line are executed as a /bin/sh shell script before anything else is
29 # done in this directory.
33 keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf
34 bfd binutils byacc cvs deja-gnu dejagnu diff dosrel dvips emacs emacs19
35 examples expect fileutils flex gas gcc gdb gdbm gdbtest glob gprof grep
36 groff include install.sh ispell ld libg++ libgcc libgloss libiberty
37 libio librx libstdc++ m4 make mmalloc move-if-change newlib opcodes
38 pagas patch prms rcs readline sed send-pr shellutils sim tcl textutils
39 tk texinfo tgas utils uudecode wdiff xiberty
40 configure.bat makeall.bat
41 mpw-README mpw-configure mpw-config.in mpw-build.in"
43 lose_these_too="${lose_these_too} testsuite"
45 cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB"
47 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
48 keep_these_too="${keep_these_too} ${cygnus_files}"
50 lose_these_too="${lose_these_too} ${cygnus_files}"
55 if ( echo $* | grep lose\-gdbtk > /dev/null) ; then
56 lose_these_too="${lose_these_too} ${gdbtk_files}"
57 if [ -n "${verbose}" ] ; then
58 echo Deleting ${gdbtk_files}
61 keep_these_too="${keep_these_too} ${gdbtk_files}"
62 if [ -n "${verbose}" ] ; then
63 echo Keeping ${gdbtk_files}
67 # This is for newlib net releases.
68 newlib_files="COPYING.NEWLIB"
70 if ( echo $* | grep keep\-newlib > /dev/null) ; then
71 keep_these_too="${keep_these_too} ${newlib_files}"
73 lose_these_too="${lose_these_too} ${newlib_files}"
76 # This top-level directory is special. We often check out only subsets
77 # of this directory, and complaining about directories or files we didn't
78 # check out just gets obnoxious.
80 list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`"
83 for file in $list ; do
84 if [ -r $file ] || [ -d $file ] ; then
85 keep_these_too="${keep_these_too} $file"
89 list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` "
92 for file in $list ; do
93 if [ -r $file ] || [ -d $file ] ; then
94 lose_these_too="${lose_these_too} $file"
98 # All files listed between the "Things-to-keep:" line and the
99 # "Do-last:" line will be kept. All other files will be removed.
100 # Directories listed in this section will have their own Sanitize
101 # called. Directories not listed will be removed in their entirety
122 # The lines between the "Do-last:" line and the end of the file
123 # are executed as a /bin/sh shell script after everything else is
128 # Don't try to clean directories here, as the 'mv' command will fail.
129 # Also, grep fails on NFS mounted directories.
131 if ( echo $* | egrep verbose > /dev/null ) ; then
137 # Remove "sanitize-Sanitize" lines.
138 if [ -n "${verbose}" ] ; then
139 echo Cleaning unconditional sanitizations out of Makefile.in...
142 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
143 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
144 mv Makefile.in .Recover
148 if [ -n "${verbose}" ] ; then
149 echo Thawing away the \"chill\"...
152 if ( echo $* | grep keep\-chill > /dev/null ) ; then
154 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
155 if [ -n "${verbose}" ] ; then
156 echo Keeping chill stuff in $i
162 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
163 if [ -n "${verbose}" ] ; then
164 echo Thawing the \"chill\" out of $i...
167 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
168 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
169 if [ -n "${verbose}" ] ; then
170 echo Caching $i in .Recover...
179 if [ -n "${verbose}" ] ; then
180 echo Processing \"arc\"...
183 arc_files="config.sub configure.in"
185 if ( echo $* | grep keep\-arc > /dev/null ) ; then
186 for i in $arc_files ; do
187 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Keeping arc stuff in $i
195 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
196 if [ -n "${verbose}" ] ; then
197 echo Removing traces of \"arc\" from $i...
200 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
201 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
202 if [ -n "${verbose}" ] ; then
203 echo Caching $i in .Recover...
212 psion_files="config.sub configure.in"
214 if ( echo $* | grep keep\-psion > /dev/null ) ; then
215 for i in $psion_files; do
216 if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then
217 if [ -n "${verbose}" ] ; then
218 echo Keeping psion stuff in $i
224 if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then
225 if [ -n "${verbose}" ] ; then
226 echo Removing traces of \"psion\" from $i...
229 sed '/start\-sanitize\-psion/,/end-\sanitize\-psion/d' < $i > new
230 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
231 if [ -n "${verbose}" ] ; then
232 echo Caching $i in .Recover...
241 rce_files="config.sub"
243 if ( echo $* | grep keep\-rce > /dev/null ) ; then
244 for i in $rce_files ; do
245 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
246 if [ -n "${verbose}" ] ; then
247 echo Keeping rce stuff in $i
252 for i in $rce_files ; do
253 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
254 if [ -n "${verbose}" ] ; then
255 echo Removing traces of \"rce\" from $i...
258 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
259 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
260 if [ -n "${verbose}" ] ; then
261 echo Caching $i in .Recover...
271 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
272 echo '***' Some mentions of Sanitize are still left in $i! 1>&2