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 tic80_files="tic80-opc.c tic80-dis.c"
28 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
29 keep_these_too="${tic80_files} ${keep_these_too}"
31 lose_these_too="${tic80_files} ${lose_these_too}"
35 # All files listed between the "Things-to-keep:" line and the
36 # "Files-to-sed:" line will be kept. All other files will be removed.
37 # Directories listed in this section will have their own Sanitize
38 # called. Directories not listed will be removed in their entirety
112 d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
113 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
114 for i in $d30v_files ; do
115 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
116 if [ -n "${verbose}" ] ; then
117 echo Keeping d30v stuff in $i
122 for i in $d30v_files ; do
123 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
124 if [ -n "${verbose}" ] ; then
125 echo Removing traces of \"d30v\" from $i...
128 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
129 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
130 if [ -n "${verbose}" ] ; then
131 echo Caching $i in .Recover...
140 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
142 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
143 for i in $v850e_files ; do
144 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Keeping v850eq stuff in $i
151 for i in $v850e_files ; do
152 if test -f $i && (grep sanitize-v850eq $i > /dev/null) ; then
153 if [ -n "${verbose}" ] ; then
154 echo Removing traces of \"v850eq\" from $i...
157 sed '/start\-sanitize\-v850eq/,/end\-sanitize\-v850eq/d' < $i > new
158 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
159 if [ -n "${verbose}" ] ; then
160 echo Caching $i in .Recover...
168 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
169 for i in $v850e_files ; do
170 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
171 if [ -n "${verbose}" ] ; then
172 echo Keeping v850e stuff in $i
177 if ( echo $* | grep keep\-v850eq > /dev/null ) ; then
180 for i in $v850e_files ; do
181 if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then
182 if [ -n "${verbose}" ] ; then
183 echo Removing traces of \"v850e\" from $i...
186 sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new
187 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
188 if [ -n "${verbose}" ] ; then
189 echo Caching $i in .Recover...
200 r5900_files="ChangeLog mips-opc.c"
201 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
202 for i in $r5900_files ; do
203 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
204 if [ -n "${verbose}" ] ; then
205 echo Keeping r5900 stuff in $i
210 for i in $r5900_files ; do
211 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
212 if [ -n "${verbose}" ] ; then
213 echo Removing traces of \"r5900\" from $i...
216 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
217 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
218 if [ -n "${verbose}" ] ; then
219 echo Caching $i in .Recover...
228 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
229 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
230 for i in $tic80_files ; do
231 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
232 if [ -n "${verbose}" ] ; then
233 echo Keeping tic80 stuff in $i
238 for i in $tic80_files ; do
239 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
240 if [ -n "${verbose}" ] ; then
241 echo Removing traces of \"tic80\" from $i...
244 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
245 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
246 if [ -n "${verbose}" ] ; then
247 echo Caching $i in .Recover...
256 coldfire_files="ChangeLog m68k-opc.c"
257 if ( echo $* | grep keep\-coldfire > /dev/null ) ; then
258 for i in $coldfire_files ; do
259 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
260 if [ -n "${verbose}" ] ; then
261 echo Keeping coldfire stuff in $i
266 for i in $coldfire_files ; do
267 if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then
268 if [ -n "${verbose}" ] ; then
269 echo Removing traces of \"coldfire\" from $i...
272 sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new
273 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
274 if [ -n "${verbose}" ] ; then
275 echo Caching $i in .Recover...
284 if [ -n "${verbose}" ] ; then
285 echo Processing \"sh4\"...
288 sh4_files="ChangeLog sh-opc.h sh-dis.c"
289 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
290 for i in $sh4_files ; do
291 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
292 if [ -n "${verbose}" ] ; then
293 echo Keeping sh4 stuff in $i
298 for i in $sh4_files ; do
299 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
300 if [ -n "${verbose}" ] ; then
301 echo Removing traces of \"sh4\" from $i...
304 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
305 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
306 if [ -n "${verbose}" ] ; then
307 echo Caching $i in .Recover...
317 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
318 echo '***' Some mentions of Sanitize are still left in $i! 1>&2