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 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
113 arc_files="ChangeLog Makefile.in configure.in configure disassemble.c"
114 if ( echo $* | grep keep\-arc > /dev/null ) ; then
115 for i in $arc_files ; do
116 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
117 if [ -n "${verbose}" ] ; then
118 echo Keeping arc stuff in $i
123 for i in $arc_files ; do
124 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
125 if [ -n "${verbose}" ] ; then
126 echo Removing traces of \"arc\" from $i...
129 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
130 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
131 if [ -n "${verbose}" ] ; then
132 echo Caching $i in .Recover...
141 d30v_files="ChangeLog Makefile.in configure.in configure disassemble.c"
142 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
143 for i in $d30v_files ; do
144 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Keeping d30v stuff in $i
151 for i in $d30v_files ; do
152 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
153 if [ -n "${verbose}" ] ; then
154 echo Removing traces of \"d30v\" from $i...
157 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
158 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
159 if [ -n "${verbose}" ] ; then
160 echo Caching $i in .Recover...
169 v850_files="ChangeLog Makefile.in configure.in configure disassemble.c"
170 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
171 for i in $v850_files ; do
172 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
173 if [ -n "${verbose}" ] ; then
174 echo Keeping v850 stuff in $i
179 for i in $v850_files ; do
180 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
181 if [ -n "${verbose}" ] ; then
182 echo Removing traces of \"v850\" from $i...
185 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
186 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
187 if [ -n "${verbose}" ] ; then
188 echo Caching $i in .Recover...
197 r5900_files="ChangeLog mips-opc.c"
198 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
199 for i in $r5900_files ; do
200 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
201 if [ -n "${verbose}" ] ; then
202 echo Keeping r5900 stuff in $i
207 for i in $r5900_files ; do
208 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
209 if [ -n "${verbose}" ] ; then
210 echo Removing traces of \"r5900\" from $i...
213 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
214 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
215 if [ -n "${verbose}" ] ; then
216 echo Caching $i in .Recover...
225 tic80_files="ChangeLog Makefile.in configure.in configure disassemble.c"
226 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
227 for i in $tic80_files ; do
228 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
229 if [ -n "${verbose}" ] ; then
230 echo Keeping tic80 stuff in $i
235 for i in $tic80_files ; do
236 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
237 if [ -n "${verbose}" ] ; then
238 echo Removing traces of \"tic80\" from $i...
241 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
242 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
243 if [ -n "${verbose}" ] ; then
244 echo Caching $i in .Recover...
253 coldfire_files="ChangeLog m68k-opc.c"
254 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
255 for i in $coldfire_files ; do
256 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
257 if [ -n "${verbose}" ] ; then
258 echo Keeping coldfire stuff in $i
263 for i in $coldfire_files ; do
264 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
265 if [ -n "${verbose}" ] ; then
266 echo Removing traces of \"coldfire\" from $i...
269 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
270 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
271 if [ -n "${verbose}" ] ; then
272 echo Caching $i in .Recover...
282 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
283 echo '***' Some mentions of Sanitize are still left in $i! 1>&2