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 # "Files-to-sed:" 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
122 v850_files="ChangeLog configure.in configure"
123 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
124 for i in $v850_files ; do
125 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
126 if [ -n "${verbose}" ] ; then
127 echo Keeping v850e stuff in $i
132 for i in $v850_files ; do
133 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
134 if [ -n "${verbose}" ] ; then
135 echo Removing traces of \"v850e\" from $i...
138 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
139 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
140 if [ -n "${verbose}" ] ; then
141 echo Caching $i in .Recover...
150 r5900_files="ChangeLog configure configure.in"
151 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
152 for i in $r5900_files ; do
153 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
154 if [ -n "${verbose}" ] ; then
155 echo Keeping r5900 stuff in $i
160 for i in $r5900_files ; do
161 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
162 if [ -n "${verbose}" ] ; then
163 echo Removing traces of \"r5900\" from $i...
166 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
167 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
168 if [ -n "${verbose}" ] ; then
169 echo Caching $i in .Recover...
178 vr5400_files="ChangeLog"
179 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
180 for i in $vr5400_files ; do
181 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
182 if [ -n "${verbose}" ] ; then
183 echo Keeping vr5400 stuff in $i
188 for i in $vr5400_files ; do
189 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
190 if [ -n "${verbose}" ] ; then
191 echo Removing traces of \"vr5400\" from $i...
194 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
195 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
196 if [ -n "${verbose}" ] ; then
197 echo Caching $i in .Recover...
206 tx19_files="ChangeLog"
207 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
208 for i in $tx19_files ; do
209 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
210 if [ -n "${verbose}" ] ; then
211 echo Keeping tx19 stuff in $i
216 for i in $tx19_files ; do
217 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
218 if [ -n "${verbose}" ] ; then
219 echo Removing traces of \"tx19\" from $i...
222 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
223 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
224 if [ -n "${verbose}" ] ; then
225 echo Caching $i in .Recover...
234 tx49_files="ChangeLog"
235 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
236 for i in $tx49_files ; do
237 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
238 if [ -n "${verbose}" ] ; then
239 echo Keeping tx49 stuff in $i
244 for i in $tx49_files ; do
245 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
246 if [ -n "${verbose}" ] ; then
247 echo Removing traces of \"tx49\" from $i...
250 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
251 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
252 if [ -n "${verbose}" ] ; then
253 echo Caching $i in .Recover...
262 tic80_files="ChangeLog configure.in configure"
263 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
264 for i in $tic80_files ; do
265 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
266 if [ -n "${verbose}" ] ; then
267 echo Keeping tic80 stuff in $i
272 for i in $tic80_files ; do
273 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
274 if [ -n "${verbose}" ] ; then
275 echo Removing traces of \"tic80\" from $i...
278 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
279 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
280 if [ -n "${verbose}" ] ; then
281 echo Caching $i in .Recover...
290 d30v_files="ChangeLog configure configure.in"
291 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
292 for i in $d30v_files ; do
293 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
294 if [ -n "${verbose}" ] ; then
295 echo Keeping d30v stuff in $i
300 for i in $d30v_files ; do
301 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
302 if [ -n "${verbose}" ] ; then
303 echo Removing traces of \"d30v\" from $i...
306 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
307 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
308 if [ -n "${verbose}" ] ; then
309 echo Caching $i in .Recover...
318 if [ -n "${verbose}" ] ; then
319 echo Processing \"sh4\"...
322 sh4_files="ChangeLog"
323 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
324 for i in $sh4_files ; do
325 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
326 if [ -n "${verbose}" ] ; then
327 echo Keeping sh4 stuff in $i
332 for i in $sh4_files ; do
333 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
334 if [ -n "${verbose}" ] ; then
335 echo Removing traces of \"sh4\" from $i...
338 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
339 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
340 if [ -n "${verbose}" ] ; then
341 echo Caching $i in .Recover...
350 m32rx_files="ChangeLog configure.in configure"
351 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
352 for i in $m32rx_files ; do
353 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
354 if [ -n "${verbose}" ] ; then
355 echo Keeping m32rx stuff in $i
360 for i in $m32rx_files ; do
361 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
362 if [ -n "${verbose}" ] ; then
363 echo Removing traces of \"m32rx\" from $i...
366 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new
367 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
368 if [ -n "${verbose}" ] ; then
369 echo Caching $i in .Recover...
378 sky_files="ChangeLog configure.in configure"
379 if ( echo $* | grep keep\-sky > /dev/null ) ; then
380 for i in $sky_files ; do
381 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
382 if [ -n "${verbose}" ] ; then
383 echo Keeping sky stuff in $i
388 for i in $sky_files ; do
389 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
390 if [ -n "${verbose}" ] ; then
391 echo Removing traces of \"sky\" from $i...
394 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
395 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
396 if [ -n "${verbose}" ] ; then
397 echo Caching $i in .Recover...
406 vr4111_files="ChangeLog"
407 if ( echo $* | grep keep\-vr4111 > /dev/null ) ; then
408 for i in $vr4111_files ; do
409 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
410 if [ -n "${verbose}" ] ; then
411 echo Keeping vr4111 stuff in $i
416 for i in $vr4111_files ; do
417 if test ! -d $i && (grep sanitize-vr4111 $i > /dev/null) ; then
418 if [ -n "${verbose}" ] ; then
419 echo Removing traces of \"vr4111\" from $i...
422 sed '/start\-sanitize\-vr4111/,/end-\sanitize\-vr4111/d' < $i > new
423 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
424 if [ -n "${verbose}" ] ; then
425 echo Caching $i in .Recover...
435 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
436 echo '***' Some mentions of Sanitize are still left in $i! 1>&2