1 # Sanitize.in for devo.
5 # Each directory to survive it's way into a release will need a file
6 # like this one called "./.Sanitize". All keyword lines must exist,
7 # and must exist in the order specified by this file. Each directory
8 # in the tree will be processed, top down, in the following order.
10 # Hash started lines like this one are comments and will be deleted
11 # before anything else is done. Blank lines will also be squashed
14 # The lines between the "Do-first:" line and the "Things-to-keep:"
15 # line are executed as a /bin/sh shell script before anything else is
20 r5900_files="r5900.igen"
21 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
22 keep_these_too="${r5900_files} ${keep_these_too}"
24 lose_these_too="${r5900_files} ${lose_these_too}"
27 vr4320_files="vr4320.igen"
28 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
29 keep_these_too="${vr4320_files} ${keep_these_too}"
31 lose_these_too="${vr4320_files} ${lose_these_too}"
34 tx3904_files="dv-tx3904cpu.c dv-tx3904irc.c dv-tx3904tmr.c"
35 if ( echo $* | grep keep\-tx3904 > /dev/null ) ; then
36 keep_these_too="${tx3904_files} ${keep_these_too}"
38 lose_these_too="${tx3904_files} ${lose_these_too}"
41 sky_files="ChangeLog.sky sky-device.c sky-device.h sky-dma.c sky-dma.h sky-bits.h"
42 sky_files="$sky_files sky-engine.c sky-gpuif.c sky-gpuif.h"
43 sky_files="$sky_files sky-gs.c sky-gs.h"
44 sky_files="$sky_files sky-hardware.c sky-hardware.h sky-gdb.c sky-gdb.h"
45 sky_files="$sky_files sky-libvpe.c sky-libvpe.h sky-pke.c sky-pke.h"
46 sky_files="$sky_files sky-vpe.h sky-vu.h sky-vu.c sky-vudis.h sky-vudis.c"
47 sky_files="$sky_files sky-console.h sky-console.c"
48 sky_files="$sky_files sky-interact.h sky-interact.c"
49 sky_files="$sky_files sky-indebug.h sky-indebug.c"
50 if ( echo $* | grep keep\-sky > /dev/null ) ; then
51 keep_these_too="${sky_files} ${keep_these_too}"
53 lose_these_too="${sky_files} ${lose_these_too}"
56 vr5400_files="vr5400.igen mdmx.igen"
57 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
58 keep_these_too="${vr5400_files} ${keep_these_too}"
60 lose_these_too="${vr5400_files} ${lose_these_too}"
63 # All files listed between the "Things-to-keep:" line and the
64 # "Files-to-sed:" line will be kept. All other files will be removed.
65 # Directories listed in this section will have their own Sanitize
66 # called. Directories not listed will be removed in their entirety
95 r5900_files="ChangeLog configure configure.in sim-main.h interp.c gencode.c mips.igen mips.dc m16.igen r5900.igen tx.igen"
97 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
98 for i in $r5900_files ; do
99 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
100 if [ -n "${verbose}" ] ; then
101 echo Keeping r5900 stuff in $i
107 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
108 if [ -n "${verbose}" ] ; then
109 echo Removing traces of \"r5900\" from $i...
112 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
113 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
114 if [ -n "${verbose}" ] ; then
115 echo Caching $i in .Recover...
125 sky_files="ChangeLog Makefile.in configure configure.in"
127 if ( echo $* | grep keep\-sky > /dev/null ) ; then
128 for i in $sky_files ; do
129 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
130 if [ -n "${verbose}" ] ; then
131 echo Keeping sky stuff in $i
137 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
138 if [ -n "${verbose}" ] ; then
139 echo Removing traces of \"sky\" from $i...
142 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
143 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
144 if [ -n "${verbose}" ] ; then
145 echo Caching $i in .Recover...
155 tx19_files="ChangeLog configure configure.in sim-main.h interp.c gencode.c mips.igen mips.dc m16.igen"
157 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
158 for i in $tx19_files ; do
159 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
160 if [ -n "${verbose}" ] ; then
161 echo Keeping tx19 stuff in $i
167 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
168 if [ -n "${verbose}" ] ; then
169 echo Removing traces of \"tx19\" from $i...
172 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
173 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
174 if [ -n "${verbose}" ] ; then
175 echo Caching $i in .Recover...
185 tx49_files="ChangeLog configure.in configure gencode.c"
187 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
188 for i in $tx49_files ; do
189 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
190 if [ -n "${verbose}" ] ; then
191 echo Keeping tx49 stuff in $i
197 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
198 if [ -n "${verbose}" ] ; then
199 echo Removing traces of \"tx49\" from $i...
202 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
203 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
204 if [ -n "${verbose}" ] ; then
205 echo Caching $i in .Recover...
215 vr5400_files="ChangeLog configure configure.in sim-main.h interp.c gencode.c mips.igen mips.dc m16.igen vr5400.igen mdmx.igen"
217 if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then
218 for i in $vr5400_files ; do
219 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
220 if [ -n "${verbose}" ] ; then
221 echo Keeping vr5400 stuff in $i
227 if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then
228 if [ -n "${verbose}" ] ; then
229 echo Removing traces of \"vr5400\" from $i...
232 sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new
233 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
234 if [ -n "${verbose}" ] ; then
235 echo Caching $i in .Recover...
244 vr4320_files="ChangeLog Makefile.in configure configure.in mips.igen"
246 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
247 for i in $vr4320_files ; do
248 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
249 if [ -n "${verbose}" ] ; then
250 echo Keeping vr4320 stuff in $i
256 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
257 if [ -n "${verbose}" ] ; then
258 echo Removing traces of \"vr4320\" from $i...
261 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
262 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
263 if [ -n "${verbose}" ] ; then
264 echo Caching $i in .Recover...
274 tx3904_files="ChangeLog configure configure.in interp.c"
276 if ( echo $* | grep keep\-tx3904 > /dev/null ) ; then
277 for i in $tx3904_files ; do
278 if test ! -d $i && (grep sanitize-tx3904 $i > /dev/null) ; then
279 if [ -n "${verbose}" ] ; then
280 echo Keeping tx3904 stuff in $i
286 if test ! -d $i && (grep sanitize-tx3904 $i > /dev/null) ; then
287 if [ -n "${verbose}" ] ; then
288 echo Removing traces of \"tx3904\" from $i...
291 sed '/start\-sanitize\-tx3904/,/end-\sanitize\-tx3904/d' < $i > new
292 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
293 if [ -n "${verbose}" ] ; then
294 echo Caching $i in .Recover...
305 never_files="ChangeLog configure configure.in interp.c gencode.c mips.igen mips.dc"
308 if test ! -d $i && (grep sanitize-cygnus-never $i > /dev/null) ; then
309 if [ -n "${verbose}" ] ; then
310 echo Removing traces of \"cygnus-never\" from $i...
313 sed '/start\-sanitize\-cygnus\-never/,/end-\sanitize\-cygnus\-never/d' < $i > new
314 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
315 if [ -n "${verbose}" ] ; then
316 echo Caching $i in .Recover...
326 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
327 echo '***' Some mentions of Sanitize are still left in $i! 1>&2