1 # .Sanitize for devo/opcodes.
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.
18 d30v_files="d30v-dis.c d30v-opc.c"
20 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
21 keep_these_too="${d30v_files} ${keep_these_too}"
23 lose_these_too="${d30v_files} ${lose_these_too}"
26 v850_files="v850-opc.c v850-dis.c"
28 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
29 keep_these_too="${v850_files} ${keep_these_too}"
31 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
32 keep_these_too="${v850_files} ${keep_these_too}"
34 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
35 keep_these_too="${v850_files} ${keep_these_too}"
37 lose_these_too="${v850_files} ${lose_these_too}"
42 tic80_files="tic80-opc.c tic80-dis.c"
44 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
45 keep_these_too="${tic80_files} ${keep_these_too}"
47 lose_these_too="${tic80_files} ${lose_these_too}"
51 # All files listed between the "Things-to-keep:" line and the
52 # "Files-to-sed:" line will be kept. All other files will be removed.
53 # Directories listed in this section will have their own Sanitize
54 # called. Directories not listed will be removed in their entirety
126 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
127 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
128 for i in $d30v_files ; do
129 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
130 if [ -n "${verbose}" ] ; then
131 echo Keeping d30v stuff in $i
136 for i in $d30v_files ; do
137 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
138 if [ -n "${verbose}" ] ; then
139 echo Removing traces of \"d30v\" from $i...
142 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
143 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
144 if [ -n "${verbose}" ] ; then
145 echo Caching $i in .Recover...
154 v850_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
155 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
156 for i in $v850_files ; do
157 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
158 if [ -n "${verbose}" ] ; then
159 echo Keeping v850 stuff in $i
164 for i in $v850_files ; do
165 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
166 if [ -n "${verbose}" ] ; then
167 echo Removing traces of \"v850\" from $i...
170 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
171 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
172 if [ -n "${verbose}" ] ; then
173 echo Caching $i in .Recover...
182 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
183 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
184 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
185 for i in $v850e_files ; do
186 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
187 if [ -n "${verbose}" ] ; then
188 echo Keeping v850e/v850eq stuff in $i
193 for i in $v850e_files ; do
194 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
195 if [ -n "${verbose}" ] ; then
196 echo Removing traces of \"v850eq\" from $i...
199 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
200 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
201 if [ -n "${verbose}" ] ; then
202 echo Caching $i in .Recover...
211 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
212 for i in $v850e_files ; do
213 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
214 if [ -n "${verbose}" ] ; then
215 echo Keeping v850e/v850eq stuff in $i
220 for i in $v850e_files ; do
221 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
222 if [ -n "${verbose}" ] ; then
223 echo Removing traces of \"v850e/v850eq\" from $i...
226 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
227 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
228 if [ -n "${verbose}" ] ; then
229 echo Caching $i in .Recover...
240 r5900_files="ChangeLog mips-opc.c"
241 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
242 for i in $r5900_files ; do
243 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
244 if [ -n "${verbose}" ] ; then
245 echo Keeping r5900 stuff in $i
250 for i in $r5900_files ; do
251 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
252 if [ -n "${verbose}" ] ; then
253 echo Removing traces of \"r5900\" from $i...
256 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
257 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
258 if [ -n "${verbose}" ] ; then
259 echo Caching $i in .Recover...
268 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
269 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
270 for i in $tic80_files ; do
271 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
272 if [ -n "${verbose}" ] ; then
273 echo Keeping tic80 stuff in $i
278 for i in $tic80_files ; do
279 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
280 if [ -n "${verbose}" ] ; then
281 echo Removing traces of \"tic80\" from $i...
284 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
285 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
286 if [ -n "${verbose}" ] ; then
287 echo Caching $i in .Recover...
296 coldfire_files="ChangeLog m68k-opc.c"
297 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
298 for i in $coldfire_files ; do
299 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
300 if [ -n "${verbose}" ] ; then
301 echo Keeping coldfire stuff in $i
306 for i in $coldfire_files ; do
307 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
308 if [ -n "${verbose}" ] ; then
309 echo Removing traces of \"coldfire\" from $i...
312 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
313 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
314 if [ -n "${verbose}" ] ; then
315 echo Caching $i in .Recover...
324 if [ -n "${verbose}" ] ; then
325 echo Processing \"sh4\"...
328 sh4_files="ChangeLog sh-opc.h sh-dis.c"
329 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
330 for i in $sh4_files ; do
331 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
332 if [ -n "${verbose}" ] ; then
333 echo Keeping sh4 stuff in $i
338 for i in $sh4_files ; do
339 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
340 if [ -n "${verbose}" ] ; then
341 echo Removing traces of \"sh4\" from $i...
344 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
345 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
346 if [ -n "${verbose}" ] ; then
347 echo Caching $i in .Recover...
357 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
358 echo '***' Some mentions of Sanitize are still left in $i! 1>&2