| 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 | cygnus_files="cgen.sh cgen-asm.in cgen-dis.in cgen-opc.in" |
| 19 | |
| 20 | if ( echo $* | grep keep\-cygnus > /dev/null ) ; then |
| 21 | keep_these_too="${cygnus_files} ${keep_these_too}" |
| 22 | else |
| 23 | lose_these_too="${cygnus_files} ${lose_these_too}" |
| 24 | fi |
| 25 | |
| 26 | d30v_files="d30v-dis.c d30v-opc.c" |
| 27 | |
| 28 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then |
| 29 | keep_these_too="${d30v_files} ${keep_these_too}" |
| 30 | else |
| 31 | lose_these_too="${d30v_files} ${lose_these_too}" |
| 32 | fi |
| 33 | |
| 34 | tic80_files="tic80-opc.c tic80-dis.c" |
| 35 | |
| 36 | if ( echo $* | grep keep\-tic80 > /dev/null ) ; then |
| 37 | keep_these_too="${tic80_files} ${keep_these_too}" |
| 38 | else |
| 39 | lose_these_too="${tic80_files} ${lose_these_too}" |
| 40 | fi |
| 41 | |
| 42 | sky_files="dvp-opc.c dvp-dis.c" |
| 43 | |
| 44 | if ( echo $* | grep keep\-sky > /dev/null ) ; then |
| 45 | keep_these_too="${sky_files} ${keep_these_too}" |
| 46 | else |
| 47 | lose_these_too="${sky_files} ${lose_these_too}" |
| 48 | fi |
| 49 | |
| 50 | r5900_files="vu0.h" |
| 51 | |
| 52 | if ( echo $* | grep keep\-r5900 > /dev/null ) ; then |
| 53 | keep_these_too="${r5900_files} ${keep_these_too}" |
| 54 | else |
| 55 | lose_these_too="${r5900_files} ${lose_these_too}" |
| 56 | fi |
| 57 | |
| 58 | # All files listed between the "Things-to-keep:" line and the |
| 59 | # "Files-to-sed:" line will be kept. All other files will be removed. |
| 60 | # Directories listed in this section will have their own Sanitize |
| 61 | # called. Directories not listed will be removed in their entirety |
| 62 | # with rm -rf. |
| 63 | |
| 64 | Things-to-keep: |
| 65 | |
| 66 | ChangeLog |
| 67 | Makefile.am |
| 68 | Makefile.in |
| 69 | acconfig.h |
| 70 | acinclude.m4 |
| 71 | aclocal.m4 |
| 72 | alpha-dis.c |
| 73 | alpha-opc.c |
| 74 | arc-dis.c |
| 75 | arc-opc.c |
| 76 | arm-dis.c |
| 77 | arm-opc.h |
| 78 | a29k-dis.c |
| 79 | cgen-asm.c |
| 80 | cgen-dis.c |
| 81 | cgen-opc.c |
| 82 | config.in |
| 83 | configure |
| 84 | configure.bat |
| 85 | configure.in |
| 86 | d10v-dis.c |
| 87 | d10v-opc.c |
| 88 | dep-in.sed |
| 89 | dis-buf.c |
| 90 | disassemble.c |
| 91 | h8300-dis.c |
| 92 | h8500-dis.c |
| 93 | h8500-opc.h |
| 94 | hppa-dis.c |
| 95 | i386-dis.c |
| 96 | i960-dis.c |
| 97 | m32r-asm.c |
| 98 | m32r-dis.c |
| 99 | m32r-opc.c |
| 100 | m32r-opc.h |
| 101 | m68k-dis.c |
| 102 | m68k-opc.c |
| 103 | m88k-dis.c |
| 104 | makefile.vms |
| 105 | mips-dis.c |
| 106 | mips-opc.c |
| 107 | mips16-opc.c |
| 108 | m10200-dis.c |
| 109 | m10200-opc.c |
| 110 | m10300-dis.c |
| 111 | m10300-opc.c |
| 112 | mpw-config.in |
| 113 | mpw-make.sed |
| 114 | ns32k-dis.c |
| 115 | opintl.h |
| 116 | po |
| 117 | ppc-dis.c |
| 118 | ppc-opc.c |
| 119 | sh-opc.h |
| 120 | sh-dis.c |
| 121 | sparc-dis.c |
| 122 | sparc-opc.c |
| 123 | stamp-h.in |
| 124 | sysdep.h |
| 125 | tic30-dis.c |
| 126 | w65-dis.c |
| 127 | w65-opc.h |
| 128 | v850-opc.c |
| 129 | v850-dis.c |
| 130 | z8k-dis.c |
| 131 | z8k-opc.h |
| 132 | z8kgen.c |
| 133 | |
| 134 | Things-to-lose: |
| 135 | |
| 136 | Do-last: |
| 137 | |
| 138 | cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure" |
| 139 | if ( echo $* | grep keep\-cygnus > /dev/null ) ; then |
| 140 | for i in $cygnus_files ; do |
| 141 | if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then |
| 142 | if [ -n "${verbose}" ] ; then |
| 143 | echo Keeping cygnus stuff in $i |
| 144 | fi |
| 145 | fi |
| 146 | done |
| 147 | else |
| 148 | for i in $cygnus_files ; do |
| 149 | if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then |
| 150 | if [ -n "${verbose}" ] ; then |
| 151 | echo Removing traces of \"cygnus\" from $i... |
| 152 | fi |
| 153 | cp $i new |
| 154 | sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new |
| 155 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 156 | if [ -n "${verbose}" ] ; then |
| 157 | echo Caching $i in .Recover... |
| 158 | fi |
| 159 | mv $i .Recover |
| 160 | fi |
| 161 | mv new $i |
| 162 | fi |
| 163 | done |
| 164 | fi |
| 165 | |
| 166 | d30v_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c" |
| 167 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then |
| 168 | for i in $d30v_files ; do |
| 169 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then |
| 170 | if [ -n "${verbose}" ] ; then |
| 171 | echo Keeping d30v stuff in $i |
| 172 | fi |
| 173 | fi |
| 174 | done |
| 175 | else |
| 176 | for i in $d30v_files ; do |
| 177 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then |
| 178 | if [ -n "${verbose}" ] ; then |
| 179 | echo Removing traces of \"d30v\" from $i... |
| 180 | fi |
| 181 | cp $i new |
| 182 | sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new |
| 183 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 184 | if [ -n "${verbose}" ] ; then |
| 185 | echo Caching $i in .Recover... |
| 186 | fi |
| 187 | mv $i .Recover |
| 188 | fi |
| 189 | mv new $i |
| 190 | fi |
| 191 | done |
| 192 | fi |
| 193 | |
| 194 | v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c" |
| 195 | if ( echo $* | grep keep\-v850e > /dev/null ) ; then |
| 196 | for i in $v850e_files ; do |
| 197 | if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then |
| 198 | if [ -n "${verbose}" ] ; then |
| 199 | echo Keeping v850e stuff in $i |
| 200 | fi |
| 201 | fi |
| 202 | done |
| 203 | else |
| 204 | for i in $v850e_files ; do |
| 205 | if test -f $i && (grep sanitize-v850e $i > /dev/null) ; then |
| 206 | if [ -n "${verbose}" ] ; then |
| 207 | echo Removing traces of \"v850e\" from $i... |
| 208 | fi |
| 209 | cp $i new |
| 210 | sed '/start\-sanitize\-v850e/,/end\-sanitize\-v850e/d' < $i > new |
| 211 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 212 | if [ -n "${verbose}" ] ; then |
| 213 | echo Caching $i in .Recover... |
| 214 | fi |
| 215 | mv $i .Recover |
| 216 | fi |
| 217 | mv new $i |
| 218 | fi |
| 219 | done |
| 220 | fi |
| 221 | |
| 222 | |
| 223 | r5900_files="ChangeLog mips-opc.c mips-dis.c Makefile.am Makefile.in" |
| 224 | if ( echo $* | grep keep\-r5900 > /dev/null ) ; then |
| 225 | for i in $r5900_files ; do |
| 226 | if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then |
| 227 | if [ -n "${verbose}" ] ; then |
| 228 | echo Keeping r5900 stuff in $i |
| 229 | fi |
| 230 | fi |
| 231 | done |
| 232 | else |
| 233 | for i in $r5900_files ; do |
| 234 | if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then |
| 235 | if [ -n "${verbose}" ] ; then |
| 236 | echo Removing traces of \"r5900\" from $i... |
| 237 | fi |
| 238 | cp $i new |
| 239 | sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new |
| 240 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 241 | if [ -n "${verbose}" ] ; then |
| 242 | echo Caching $i in .Recover... |
| 243 | fi |
| 244 | mv $i .Recover |
| 245 | fi |
| 246 | mv new $i |
| 247 | fi |
| 248 | done |
| 249 | fi |
| 250 | |
| 251 | vr4320_files="ChangeLog mips-opc.c mips-dis.c" |
| 252 | if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then |
| 253 | for i in $vr4320_files ; do |
| 254 | if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then |
| 255 | if [ -n "${verbose}" ] ; then |
| 256 | echo Keeping vr4320 stuff in $i |
| 257 | fi |
| 258 | fi |
| 259 | done |
| 260 | else |
| 261 | for i in $vr4320_files ; do |
| 262 | if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then |
| 263 | if [ -n "${verbose}" ] ; then |
| 264 | echo Removing traces of \"vr4320\" from $i... |
| 265 | fi |
| 266 | cp $i new |
| 267 | sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new |
| 268 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 269 | if [ -n "${verbose}" ] ; then |
| 270 | echo Caching $i in .Recover... |
| 271 | fi |
| 272 | mv $i .Recover |
| 273 | fi |
| 274 | mv new $i |
| 275 | fi |
| 276 | done |
| 277 | fi |
| 278 | |
| 279 | vr5400_files="ChangeLog mips-opc.c mips-dis.c" |
| 280 | if ( echo $* | grep keep\-vr5400 > /dev/null ) ; then |
| 281 | for i in $vr5400_files ; do |
| 282 | if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then |
| 283 | if [ -n "${verbose}" ] ; then |
| 284 | echo Keeping vr5400 stuff in $i |
| 285 | fi |
| 286 | fi |
| 287 | done |
| 288 | else |
| 289 | for i in $vr5400_files ; do |
| 290 | if test ! -d $i && (grep sanitize-vr5400 $i > /dev/null) ; then |
| 291 | if [ -n "${verbose}" ] ; then |
| 292 | echo Removing traces of \"vr5400\" from $i... |
| 293 | fi |
| 294 | cp $i new |
| 295 | sed '/start\-sanitize\-vr5400/,/end-\sanitize\-vr5400/d' < $i > new |
| 296 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 297 | if [ -n "${verbose}" ] ; then |
| 298 | echo Caching $i in .Recover... |
| 299 | fi |
| 300 | mv $i .Recover |
| 301 | fi |
| 302 | mv new $i |
| 303 | fi |
| 304 | done |
| 305 | fi |
| 306 | |
| 307 | tx19_files="ChangeLog mips16-opc.c mips-dis.c" |
| 308 | if ( echo $* | grep keep\-tx19 > /dev/null ) ; then |
| 309 | for i in $tx19_files ; do |
| 310 | if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then |
| 311 | if [ -n "${verbose}" ] ; then |
| 312 | echo Keeping tx19 stuff in $i |
| 313 | fi |
| 314 | fi |
| 315 | done |
| 316 | else |
| 317 | for i in $tx19_files ; do |
| 318 | if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then |
| 319 | if [ -n "${verbose}" ] ; then |
| 320 | echo Removing traces of \"tx19\" from $i... |
| 321 | fi |
| 322 | cp $i new |
| 323 | sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new |
| 324 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 325 | if [ -n "${verbose}" ] ; then |
| 326 | echo Caching $i in .Recover... |
| 327 | fi |
| 328 | mv $i .Recover |
| 329 | fi |
| 330 | mv new $i |
| 331 | fi |
| 332 | done |
| 333 | fi |
| 334 | |
| 335 | tx49_files="ChangeLog mips-opc.c mips-dis.c" |
| 336 | if ( echo $* | grep keep\-tx49 > /dev/null ) ; then |
| 337 | for i in $tx49_files ; do |
| 338 | if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then |
| 339 | if [ -n "${verbose}" ] ; then |
| 340 | echo Keeping tx49 stuff in $i |
| 341 | fi |
| 342 | fi |
| 343 | done |
| 344 | else |
| 345 | for i in $tx49_files ; do |
| 346 | if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then |
| 347 | if [ -n "${verbose}" ] ; then |
| 348 | echo Removing traces of \"tx49\" from $i... |
| 349 | fi |
| 350 | cp $i new |
| 351 | sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new |
| 352 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 353 | if [ -n "${verbose}" ] ; then |
| 354 | echo Caching $i in .Recover... |
| 355 | fi |
| 356 | mv $i .Recover |
| 357 | fi |
| 358 | mv new $i |
| 359 | fi |
| 360 | done |
| 361 | fi |
| 362 | |
| 363 | tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c" |
| 364 | if ( echo $* | grep keep\-tic80 > /dev/null ) ; then |
| 365 | for i in $tic80_files ; do |
| 366 | if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then |
| 367 | if [ -n "${verbose}" ] ; then |
| 368 | echo Keeping tic80 stuff in $i |
| 369 | fi |
| 370 | fi |
| 371 | done |
| 372 | else |
| 373 | for i in $tic80_files ; do |
| 374 | if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then |
| 375 | if [ -n "${verbose}" ] ; then |
| 376 | echo Removing traces of \"tic80\" from $i... |
| 377 | fi |
| 378 | cp $i new |
| 379 | sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new |
| 380 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 381 | if [ -n "${verbose}" ] ; then |
| 382 | echo Caching $i in .Recover... |
| 383 | fi |
| 384 | mv $i .Recover |
| 385 | fi |
| 386 | mv new $i |
| 387 | fi |
| 388 | done |
| 389 | fi |
| 390 | |
| 391 | coldfire_files="ChangeLog m68k-opc.c" |
| 392 | if ( echo $* | grep keep\-coldfire > /dev/null ) ; then |
| 393 | for i in $coldfire_files ; do |
| 394 | if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then |
| 395 | if [ -n "${verbose}" ] ; then |
| 396 | echo Keeping coldfire stuff in $i |
| 397 | fi |
| 398 | fi |
| 399 | done |
| 400 | else |
| 401 | for i in $coldfire_files ; do |
| 402 | if test ! -d $i && (grep sanitize-coldfire $i > /dev/null) ; then |
| 403 | if [ -n "${verbose}" ] ; then |
| 404 | echo Removing traces of \"coldfire\" from $i... |
| 405 | fi |
| 406 | cp $i new |
| 407 | sed '/start\-sanitize\-coldfire/,/end-\sanitize\-coldfire/d' < $i > new |
| 408 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 409 | if [ -n "${verbose}" ] ; then |
| 410 | echo Caching $i in .Recover... |
| 411 | fi |
| 412 | mv $i .Recover |
| 413 | fi |
| 414 | mv new $i |
| 415 | fi |
| 416 | done |
| 417 | fi |
| 418 | |
| 419 | sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c" |
| 420 | if ( echo $* | grep keep\-sky > /dev/null ) ; then |
| 421 | for i in $sky_files ; do |
| 422 | if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then |
| 423 | if [ -n "${verbose}" ] ; then |
| 424 | echo Keeping sky stuff in $i |
| 425 | fi |
| 426 | fi |
| 427 | done |
| 428 | else |
| 429 | for i in $sky_files ; do |
| 430 | if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then |
| 431 | if [ -n "${verbose}" ] ; then |
| 432 | echo Removing traces of \"sky\" from $i... |
| 433 | fi |
| 434 | cp $i new |
| 435 | sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new |
| 436 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 437 | if [ -n "${verbose}" ] ; then |
| 438 | echo Caching $i in .Recover... |
| 439 | fi |
| 440 | mv $i .Recover |
| 441 | fi |
| 442 | mv new $i |
| 443 | fi |
| 444 | done |
| 445 | fi |
| 446 | |
| 447 | m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c" |
| 448 | if ( echo $* | grep keep\-m32rx > /dev/null ) ; then |
| 449 | for i in $m32rx_files ; do |
| 450 | if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then |
| 451 | if [ -n "${verbose}" ] ; then |
| 452 | echo Keeping m32rx stuff in $i |
| 453 | fi |
| 454 | fi |
| 455 | done |
| 456 | else |
| 457 | for i in $m32rx_files ; do |
| 458 | if test -f $i && (grep sanitize-m32rx $i > /dev/null) ; then |
| 459 | if [ -n "${verbose}" ] ; then |
| 460 | echo Removing traces of \"m32rx\" from $i... |
| 461 | fi |
| 462 | cp $i new |
| 463 | # The PIPE sanitization will be much cleaner with redact. |
| 464 | sed -e '/start\-sanitize\-m32rx/,/end\-sanitize\-m32rx/d' \ |
| 465 | -e 's/, PIPE_[A-Z]*//g' < $i > new |
| 466 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then |
| 467 | if [ -n "${verbose}" ] ; then |
| 468 | echo Caching $i in .Recover... |
| 469 | fi |
| 470 | mv $i .Recover |
| 471 | fi |
| 472 | mv new $i |
| 473 | fi |
| 474 | done |
| 475 | fi |
| 476 | |
| 477 | for i in * ; do |
| 478 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then |
| 479 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 |
| 480 | fi |
| 481 | done |
| 482 | |
| 483 | # This must come after all other sanitizations. Re-sanitize the .pot |
| 484 | # file. |
| 485 | if [ -n "${verbose}" ]; then |
| 486 | echo Re-computing files for gettext ... |
| 487 | fi |
| 488 | |
| 489 | if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then |
| 490 | if [ -n "${verbose}" ]; then |
| 491 | echo Caching po/POTFILES.in in .Recover... |
| 492 | fi |
| 493 | mv po/POTFILES.in po/.Recover |
| 494 | fi |
| 495 | |
| 496 | ls -1 *.[ch] cg*.in 2>/dev/null | sed -e 's,^\./,,' > po/POTFILES.in |
| 497 | |
| 498 | if [ -n "${safe}" -a ! -f po/.Recover/opcodes.pot ]; then |
| 499 | if [ -n "${verbose}" ]; then |
| 500 | echo Caching po/opcodes.pot in .Recover... |
| 501 | fi |
| 502 | mv po/opcodes.pot po/.Recover |
| 503 | fi |
| 504 | |
| 505 | # If this fails, Sanitization must fail. |
| 506 | xgettext -C -c -k_ -kN_ -f po/POTFILES.in -o po/opcodes.pot || exit 1 |
| 507 | |
| 508 | # End of file. |