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 arc_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
127 if ( echo $* | grep keep\-arc > /dev/null ) ; then
128 for i in $arc_files ; do
129 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
130 if [ -n "${verbose}" ] ; then
131 echo Keeping arc stuff in $i
136 for i in $arc_files ; do
137 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
138 if [ -n "${verbose}" ] ; then
139 echo Removing traces of \"arc\" from $i...
142 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
143 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
144 if [ -n "${verbose}" ] ; then
145 echo Caching $i in .Recover...
154 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
155 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
156 for i in $d30v_files ; do
157 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
158 if [ -n "${verbose}" ] ; then
159 echo Keeping d30v stuff in $i
164 for i in $d30v_files ; do
165 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
166 if [ -n "${verbose}" ] ; then
167 echo Removing traces of \"d30v\" from $i...
170 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
171 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
172 if [ -n "${verbose}" ] ; then
173 echo Caching $i in .Recover...
182 v850_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
183 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
184 for i in $v850_files ; do
185 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
186 if [ -n "${verbose}" ] ; then
187 echo Keeping v850 stuff in $i
192 for i in $v850_files ; do
193 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
194 if [ -n "${verbose}" ] ; then
195 echo Removing traces of \"v850\" from $i...
198 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
199 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
200 if [ -n "${verbose}" ] ; then
201 echo Caching $i in .Recover...
210 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
211 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
212 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
213 for i in $v850e_files ; do
214 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
215 if [ -n "${verbose}" ] ; then
216 echo Keeping v850e/v850eq stuff in $i
221 for i in $v850e_files ; do
222 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
223 if [ -n "${verbose}" ] ; then
224 echo Removing traces of \"v850eq\" from $i...
227 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
228 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
229 if [ -n "${verbose}" ] ; then
230 echo Caching $i in .Recover...
239 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
240 for i in $v850e_files ; do
241 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
242 if [ -n "${verbose}" ] ; then
243 echo Keeping v850e/v850eq stuff in $i
248 for i in $v850e_files ; do
249 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
250 if [ -n "${verbose}" ] ; then
251 echo Removing traces of \"v850e/v850eq\" from $i...
254 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
255 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
256 if [ -n "${verbose}" ] ; then
257 echo Caching $i in .Recover...
268 r5900_files="ChangeLog mips-opc.c"
269 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
270 for i in $r5900_files ; do
271 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
272 if [ -n "${verbose}" ] ; then
273 echo Keeping r5900 stuff in $i
278 for i in $r5900_files ; do
279 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
280 if [ -n "${verbose}" ] ; then
281 echo Removing traces of \"r5900\" from $i...
284 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
285 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
286 if [ -n "${verbose}" ] ; then
287 echo Caching $i in .Recover...
296 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
297 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
298 for i in $tic80_files ; do
299 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
300 if [ -n "${verbose}" ] ; then
301 echo Keeping tic80 stuff in $i
306 for i in $tic80_files ; do
307 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
308 if [ -n "${verbose}" ] ; then
309 echo Removing traces of \"tic80\" from $i...
312 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
313 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
314 if [ -n "${verbose}" ] ; then
315 echo Caching $i in .Recover...
324 coldfire_files="ChangeLog m68k-opc.c"
325 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
326 for i in $coldfire_files ; do
327 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
328 if [ -n "${verbose}" ] ; then
329 echo Keeping coldfire stuff in $i
334 for i in $coldfire_files ; do
335 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
336 if [ -n "${verbose}" ] ; then
337 echo Removing traces of \"coldfire\" from $i...
340 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
341 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
342 if [ -n "${verbose}" ] ; then
343 echo Caching $i in .Recover...
353 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
354 echo '***' Some mentions of Sanitize are still left in $i! 1>&2