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 d10v_files="d10v-dis.c d10v-opc.c"
28 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
29 keep_these_too="${d10v_files} ${keep_these_too}"
31 lose_these_too="${d10v_files} ${lose_these_too}"
34 d30v_files="d30v-dis.c d30v-opc.c"
36 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
37 keep_these_too="${d30v_files} ${keep_these_too}"
39 lose_these_too="${d30v_files} ${lose_these_too}"
42 v850_files="v850-opc.c v850-dis.c"
44 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
45 keep_these_too="${v850_files} ${keep_these_too}"
47 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
118 arc_files="ChangeLog Makefile.in configure.in configure disassemble.c"
119 if ( echo $* | grep keep\-arc > /dev/null ) ; then
120 for i in $arc_files ; do
121 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
122 if [ -n "${verbose}" ] ; then
123 echo Keeping arc stuff in $i
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 Removing traces of \"arc\" from $i...
134 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
135 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
136 if [ -n "${verbose}" ] ; then
137 echo Caching $i in .Recover...
146 d30v_files="ChangeLog Makefile.in configure.in configure disassemble.c"
147 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
148 for i in $d30v_files ; do
149 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
150 if [ -n "${verbose}" ] ; then
151 echo Keeping d30v stuff in $i
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 Removing traces of \"d30v\" from $i...
162 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
163 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
164 if [ -n "${verbose}" ] ; then
165 echo Caching $i in .Recover...
174 v850_files="ChangeLog Makefile.in configure.in configure disassemble.c"
175 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
176 for i in $v850_files ; do
177 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
178 if [ -n "${verbose}" ] ; then
179 echo Keeping v850 stuff in $i
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 Removing traces of \"v850\" from $i...
190 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
191 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
192 if [ -n "${verbose}" ] ; then
193 echo Caching $i in .Recover...
202 r5900_files="ChangeLog mips-opc.c"
203 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
204 for i in $r5900_files ; do
205 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
206 if [ -n "${verbose}" ] ; then
207 echo Keeping r5900 stuff in $i
212 for i in $r5900_files ; do
213 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
214 if [ -n "${verbose}" ] ; then
215 echo Removing traces of \"r5900\" from $i...
218 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
219 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
220 if [ -n "${verbose}" ] ; then
221 echo Caching $i in .Recover...
230 tic80_files="ChangeLog Makefile.in configure.in configure disassemble.c"
231 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
232 for i in $tic80_files ; do
233 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
234 if [ -n "${verbose}" ] ; then
235 echo Keeping tic80 stuff in $i
240 for i in $tic80_files ; do
241 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
242 if [ -n "${verbose}" ] ; then
243 echo Removing traces of \"tic80\" from $i...
246 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
247 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
248 if [ -n "${verbose}" ] ; then
249 echo Caching $i in .Recover...
260 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
261 echo '***' Some mentions of Sanitize are still left in $i! 1>&2