| 1 | # .Sanitize for devo/opcodes. |
| 2 | |
| 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. |
| 7 | |
| 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 |
| 10 | # out. |
| 11 | |
| 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. |
| 15 | |
| 16 | Do-first: |
| 17 | |
| 18 | d30v_files="d30v-dis.c d30v-opc.c" |
| 19 | |
| 20 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then |
| 21 | keep_these_too="${d30v_files} ${keep_these_too}" |
| 22 | else |
| 23 | lose_these_too="${d30v_files} ${lose_these_too}" |
| 24 | fi |
| 25 | |
| 26 | tic80_files="tic80-opc.c tic80-dis.c" |
| 27 | |
| 28 | if ( echo $* | grep keep\-tic80 > /dev/null ) ; then |
| 29 | keep_these_too="${tic80_files} ${keep_these_too}" |
| 30 | else |
| 31 | lose_these_too="${tic80_files} ${lose_these_too}" |
| 32 | fi |
| 33 | |
| 34 | # All files listed between the "Things-to-keep:" line and the |
| 35 | # "Files-to-sed:" line will be kept. All other files will be removed. |
| 36 | # Directories listed in this section will have their own Sanitize |
| 37 | # called. Directories not listed will be removed in their entirety |
| 38 | # with rm -rf. |
| 39 | |
| 40 | Things-to-keep: |
| 41 | |
| 42 | ChangeLog |
| 43 | Makefile.am |
| 44 | Makefile.in |
| 45 | acconfig.h |
| 46 | acinclude.m4 |
| 47 | aclocal.m4 |
| 48 | alpha-dis.c |
| 49 | alpha-opc.c |
| 50 | arc-dis.c |
| 51 | arc-opc.c |
| 52 | arm-dis.c |
| 53 | arm-opc.h |
| 54 | a29k-dis.c |
| 55 | cgen-asm.c |
| 56 | cgen-dis.c |
| 57 | cgen-opc.c |
| 58 | config.in |
| 59 | configure |
| 60 | configure.bat |
| 61 | configure.in |
| 62 | d10v-dis.c |
| 63 | d10v-opc.c |
| 64 | dep-in.sed |
| 65 | dis-buf.c |
| 66 | disassemble.c |
| 67 | h8300-dis.c |
| 68 | h8500-dis.c |
| 69 | h8500-opc.h |
| 70 | hppa-dis.c |
| 71 | i386-dis.c |
| 72 | i960-dis.c |
| 73 | m32r-asm.c |
| 74 | m32r-dis.c |
| 75 | m32r-opc.c |
| 76 | m32r-opc.h |
| 77 | m68k-dis.c |
| 78 | m68k-opc.c |
| 79 | m88k-dis.c |
| 80 | makefile.vms |
| 81 | mips-dis.c |
| 82 | mips-opc.c |
| 83 | mips16-opc.c |
| 84 | m10200-dis.c |
| 85 | m10200-opc.c |
| 86 | m10300-dis.c |
| 87 | m10300-opc.c |
| 88 | mpw-config.in |
| 89 | mpw-make.sed |
| 90 | ns32k-dis.c |
| 91 | ppc-dis.c |
| 92 | ppc-opc.c |
| 93 | sh-opc.h |
| 94 | sh-dis.c |
| 95 | sparc-dis.c |
| 96 | sparc-opc.c |
| 97 | stamp-h.in |
| 98 | sysdep.h |
| 99 | w65-dis.c |
| 100 | w65-opc.h |
| 101 | v850-opc.c |
| 102 | v850-dis.c |
| 103 | z8k-dis.c |
| 104 | z8k-opc.h |
| 105 | z8kgen.c |
| 106 | |
| 107 | Things-to-lose: |
| 108 | |
| 109 | Do-last: |
| 110 | |
| 111 | d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c" |
| 112 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then |
| 113 | for i in $d30v_files ; do |
| 114 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then |
| 115 | if [ -n "${verbose}" ] ; then |
| 116 | echo Keeping d30v stuff in $i |
| 117 | fi |
| 118 | fi |
| 119 | done |
| 120 | else |
| 121 | for i in $d30v_files ; do |
| 122 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then |
| 123 | if [ -n "${verbose}" ] ; then |
| 124 | echo Removing traces of \"d30v\" from $i... |
| 125 | fi |
| 126 | cp $i new |
| 127 | sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new |
| 128 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 129 | if [ -n "${verbose}" ] ; then |
| 130 | echo Caching $i in .Recover... |
| 131 | fi |
| 132 | mv $i .Recover |
| 133 | fi |
| 134 | mv new $i |
| 135 | fi |
| 136 | done |
| 137 | fi |
| 138 | |
| 139 | v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c" |
| 140 | if ( echo $* | grep keep\-v850e > /dev/null ) ; then |
| 141 | for i in $v850e_files ; do |
| 142 | if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then |
| 143 | if [ -n "${verbose}" ] ; then |
| 144 | echo Keeping v850e stuff in $i |
| 145 | fi |
| 146 | fi |
| 147 | done |
| 148 | else |
| 149 | for i in $v850e_files ; do |
| 150 | if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then |
| 151 | if [ -n "${verbose}" ] ; then |
| 152 | echo Removing traces of \"v850e\" from $i... |
| 153 | fi |
| 154 | cp $i new |
| 155 | sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new |
| 156 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 157 | if [ -n "${verbose}" ] ; then |
| 158 | echo Caching $i in .Recover... |
| 159 | fi |
| 160 | mv $i .Recover |
| 161 | fi |
| 162 | mv new $i |
| 163 | fi |
| 164 | done |
| 165 | fi |
| 166 | |
| 167 | |
| 168 | r5900_files="ChangeLog mips-opc.c" |
| 169 | if ( echo $* | grep keep\-r5900 > /dev/null ) ; then |
| 170 | for i in $r5900_files ; do |
| 171 | if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then |
| 172 | if [ -n "${verbose}" ] ; then |
| 173 | echo Keeping r5900 stuff in $i |
| 174 | fi |
| 175 | fi |
| 176 | done |
| 177 | else |
| 178 | for i in $r5900_files ; do |
| 179 | if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then |
| 180 | if [ -n "${verbose}" ] ; then |
| 181 | echo Removing traces of \"r5900\" from $i... |
| 182 | fi |
| 183 | cp $i new |
| 184 | sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new |
| 185 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 186 | if [ -n "${verbose}" ] ; then |
| 187 | echo Caching $i in .Recover... |
| 188 | fi |
| 189 | mv $i .Recover |
| 190 | fi |
| 191 | mv new $i |
| 192 | fi |
| 193 | done |
| 194 | fi |
| 195 | |
| 196 | tx19_files="ChangeLog mips16-opc.c" |
| 197 | if ( echo $* | grep keep\-tx19 > /dev/null ) ; then |
| 198 | for i in $tx19_files ; do |
| 199 | if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then |
| 200 | if [ -n "${verbose}" ] ; then |
| 201 | echo Keeping tx19 stuff in $i |
| 202 | fi |
| 203 | fi |
| 204 | done |
| 205 | else |
| 206 | for i in $tx19_files ; do |
| 207 | if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then |
| 208 | if [ -n "${verbose}" ] ; then |
| 209 | echo Removing traces of \"tx19\" from $i... |
| 210 | fi |
| 211 | cp $i new |
| 212 | sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new |
| 213 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 214 | if [ -n "${verbose}" ] ; then |
| 215 | echo Caching $i in .Recover... |
| 216 | fi |
| 217 | mv $i .Recover |
| 218 | fi |
| 219 | mv new $i |
| 220 | fi |
| 221 | done |
| 222 | fi |
| 223 | |
| 224 | tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c" |
| 225 | if ( echo $* | grep keep\-tic80 > /dev/null ) ; then |
| 226 | for i in $tic80_files ; do |
| 227 | if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then |
| 228 | if [ -n "${verbose}" ] ; then |
| 229 | echo Keeping tic80 stuff in $i |
| 230 | fi |
| 231 | fi |
| 232 | done |
| 233 | else |
| 234 | for i in $tic80_files ; do |
| 235 | if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then |
| 236 | if [ -n "${verbose}" ] ; then |
| 237 | echo Removing traces of \"tic80\" from $i... |
| 238 | fi |
| 239 | cp $i new |
| 240 | sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new |
| 241 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 242 | if [ -n "${verbose}" ] ; then |
| 243 | echo Caching $i in .Recover... |
| 244 | fi |
| 245 | mv $i .Recover |
| 246 | fi |
| 247 | mv new $i |
| 248 | fi |
| 249 | done |
| 250 | fi |
| 251 | |
| 252 | coldfire_files="ChangeLog m68k-opc.c" |
| 253 | if ( echo $* | grep keep\-coldfire > /dev/null ) ; then |
| 254 | for i in $coldfire_files ; do |
| 255 | if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then |
| 256 | if [ -n "${verbose}" ] ; then |
| 257 | echo Keeping coldfire stuff in $i |
| 258 | fi |
| 259 | fi |
| 260 | done |
| 261 | else |
| 262 | for i in $coldfire_files ; do |
| 263 | if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then |
| 264 | if [ -n "${verbose}" ] ; then |
| 265 | echo Removing traces of \"coldfire\" from $i... |
| 266 | fi |
| 267 | cp $i new |
| 268 | sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new |
| 269 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 270 | if [ -n "${verbose}" ] ; then |
| 271 | echo Caching $i in .Recover... |
| 272 | fi |
| 273 | mv $i .Recover |
| 274 | fi |
| 275 | mv new $i |
| 276 | fi |
| 277 | done |
| 278 | fi |
| 279 | |
| 280 | if [ -n "${verbose}" ] ; then |
| 281 | echo Processing \"sh4\"... |
| 282 | fi |
| 283 | |
| 284 | sh4_files="ChangeLog sh-opc.h sh-dis.c" |
| 285 | if ( echo $* | grep keep\-sh4 > /dev/null ) ; then |
| 286 | for i in $sh4_files ; do |
| 287 | if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then |
| 288 | if [ -n "${verbose}" ] ; then |
| 289 | echo Keeping sh4 stuff in $i |
| 290 | fi |
| 291 | fi |
| 292 | done |
| 293 | else |
| 294 | for i in $sh4_files ; do |
| 295 | if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then |
| 296 | if [ -n "${verbose}" ] ; then |
| 297 | echo Removing traces of \"sh4\" from $i... |
| 298 | fi |
| 299 | cp $i new |
| 300 | sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new |
| 301 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 302 | if [ -n "${verbose}" ] ; then |
| 303 | echo Caching $i in .Recover... |
| 304 | fi |
| 305 | mv $i .Recover |
| 306 | fi |
| 307 | mv new $i |
| 308 | fi |
| 309 | done |
| 310 | fi |
| 311 | |
| 312 | for i in * ; do |
| 313 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then |
| 314 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 |
| 315 | fi |
| 316 | done |
| 317 | |
| 318 | # End of file. |