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