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 arc_files="arc-dis.c arc-opc.c"
20 if ( echo $* | grep keep\-arc > /dev/null ) ; then
21 keep_these_too="${arc_files} ${keep_these_too}"
23 lose_these_too="${arc_files} ${lose_these_too}"
26 d30v_files="d30v-dis.c d30v-opc.c"
28 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
29 keep_these_too="${d30v_files} ${keep_these_too}"
31 lose_these_too="${d30v_files} ${lose_these_too}"
34 v850_files="v850-opc.c v850-dis.c"
36 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
37 keep_these_too="${v850_files} ${keep_these_too}"
39 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
40 keep_these_too="${v850_files} ${keep_these_too}"
42 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
43 keep_these_too="${v850_files} ${keep_these_too}"
45 lose_these_too="${v850_files} ${lose_these_too}"
50 tic80_files="tic80-opc.c tic80-dis.c"
52 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
53 keep_these_too="${tic80_files} ${keep_these_too}"
55 lose_these_too="${tic80_files} ${lose_these_too}"
59 # All files listed between the "Things-to-keep:" line and the
60 # "Files-to-sed:" line will be kept. All other files will be removed.
61 # Directories listed in this section will have their own Sanitize
62 # called. Directories not listed will be removed in their entirety
132 arc_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
133 if ( echo $* | grep keep\-arc > /dev/null ) ; then
134 for i in $arc_files ; do
135 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
136 if [ -n "${verbose}" ] ; then
137 echo Keeping arc stuff in $i
142 for i in $arc_files ; do
143 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
144 if [ -n "${verbose}" ] ; then
145 echo Removing traces of \"arc\" from $i...
148 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
149 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
150 if [ -n "${verbose}" ] ; then
151 echo Caching $i in .Recover...
160 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
161 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
162 for i in $d30v_files ; do
163 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
164 if [ -n "${verbose}" ] ; then
165 echo Keeping d30v stuff in $i
170 for i in $d30v_files ; do
171 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
172 if [ -n "${verbose}" ] ; then
173 echo Removing traces of \"d30v\" from $i...
176 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
177 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
178 if [ -n "${verbose}" ] ; then
179 echo Caching $i in .Recover...
188 v850_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
189 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
190 for i in $v850_files ; do
191 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
192 if [ -n "${verbose}" ] ; then
193 echo Keeping v850 stuff in $i
198 for i in $v850_files ; do
199 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
200 if [ -n "${verbose}" ] ; then
201 echo Removing traces of \"v850\" from $i...
204 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
205 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
206 if [ -n "${verbose}" ] ; then
207 echo Caching $i in .Recover...
216 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
217 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
218 for i in $v850e_files ; do
219 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
220 if [ -n "${verbose}" ] ; then
221 echo Keeping v850e stuff in $i
226 for i in $v850e_files ; do
227 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
228 if [ -n "${verbose}" ] ; then
229 echo Removing traces of \"v850e\" from $i...
232 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
233 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
234 if [ -n "${verbose}" ] ; then
235 echo Caching $i in .Recover...
243 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
244 for i in $v850e_files ; do
245 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
246 if [ -n "${verbose}" ] ; then
247 echo Keeping v850eq stuff in $i
252 for i in $v850e_files ; do
253 if test ! -d $i && (grep sanitize-v850eq $i > /dev/null) ; then
254 if [ -n "${verbose}" ] ; then
255 echo Removing traces of \"v850eq\" from $i...
258 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
259 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
260 if [ -n "${verbose}" ] ; then
261 echo Caching $i in .Recover...
270 r5900_files="ChangeLog mips-opc.c"
271 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
272 for i in $r5900_files ; do
273 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
274 if [ -n "${verbose}" ] ; then
275 echo Keeping r5900 stuff in $i
280 for i in $r5900_files ; do
281 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
282 if [ -n "${verbose}" ] ; then
283 echo Removing traces of \"r5900\" from $i...
286 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
287 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
288 if [ -n "${verbose}" ] ; then
289 echo Caching $i in .Recover...
298 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
299 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
300 for i in $tic80_files ; do
301 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
302 if [ -n "${verbose}" ] ; then
303 echo Keeping tic80 stuff in $i
308 for i in $tic80_files ; do
309 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
310 if [ -n "${verbose}" ] ; then
311 echo Removing traces of \"tic80\" from $i...
314 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
315 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
316 if [ -n "${verbose}" ] ; then
317 echo Caching $i in .Recover...
326 coldfire_files="ChangeLog m68k-opc.c"
327 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
328 for i in $coldfire_files ; do
329 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
330 if [ -n "${verbose}" ] ; then
331 echo Keeping coldfire stuff in $i
336 for i in $coldfire_files ; do
337 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
338 if [ -n "${verbose}" ] ; then
339 echo Removing traces of \"coldfire\" from $i...
342 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
343 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
344 if [ -n "${verbose}" ] ; then
345 echo Caching $i in .Recover...
355 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
356 echo '***' Some mentions of Sanitize are still left in $i! 1>&2