]> Git Repo - binutils.git/blob - opcodes/.Sanitize
* m32r-asm.c: Regenerate.
[binutils.git] / opcodes / .Sanitize
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 fr30_files="fr30-opc.h fr30-opc.c fr30-asm.c fr30-dis.c"
27
28 if ( echo $* | grep keep\-fr30 > /dev/null ) ; then
29         keep_these_too="${fr30_files} ${keep_these_too}"
30 else
31         lose_these_too="${fr30_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 # 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
56 Things-to-keep:
57
58 ChangeLog
59 Makefile.am
60 Makefile.in
61 acconfig.h
62 acinclude.m4
63 aclocal.m4
64 alpha-dis.c
65 alpha-opc.c
66 arc-dis.c
67 arc-opc.c
68 arm-dis.c
69 arm-opc.h
70 a29k-dis.c
71 cgen-asm.c
72 cgen-dis.c
73 cgen-opc.c
74 config.in
75 configure
76 configure.bat
77 configure.in
78 d10v-dis.c
79 d10v-opc.c
80 d30v-dis.c
81 d30v-opc.c
82 dep-in.sed
83 dis-buf.c
84 disassemble.c
85 h8300-dis.c
86 h8500-dis.c
87 h8500-opc.h
88 hppa-dis.c
89 i386-dis.c
90 i960-dis.c
91 m32r-asm.c
92 m32r-dis.c
93 m32r-opc.c
94 m32r-opc.h
95 m68k-dis.c
96 m68k-opc.c
97 m88k-dis.c
98 makefile.vms
99 mips-dis.c
100 mips-opc.c
101 mips16-opc.c
102 m10200-dis.c
103 m10200-opc.c
104 m10300-dis.c
105 m10300-opc.c
106 mpw-config.in
107 mpw-make.sed
108 ns32k-dis.c
109 opintl.h
110 po
111 ppc-dis.c
112 ppc-opc.c
113 sh-opc.h
114 sh-dis.c
115 sparc-dis.c
116 sparc-opc.c
117 stamp-h.in
118 sysdep.h
119 tic30-dis.c
120 vax-dis.c
121 w65-dis.c
122 w65-opc.h
123 v850-opc.c
124 v850-dis.c
125 z8k-dis.c
126 z8k-opc.h
127 z8kgen.c
128
129 Things-to-lose:
130
131 Do-last:
132
133 cygnus_files="ChangeLog Makefile.am Makefile.in configure.in configure"
134 if ( 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
142 else
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
159 fi
160
161 am33_files="ChangeLog m10300-opc.c m10300-dis.c"
162 if ( 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
170 else
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
187 fi
188
189
190 v850e_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c v850-opc.c v850-dis.c"
191 if ( 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
199 else
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
216 fi
217
218
219 r5900_files="ChangeLog mips-opc.c mips-dis.c Makefile.am Makefile.in"
220 if ( 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
228 else
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
245 fi
246
247 vr4320_files="ChangeLog mips-opc.c mips-dis.c"
248 if ( 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
256 else
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
273 fi
274
275 cygnus_files="ChangeLog mips-opc.c mips-dis.c"
276 if ( 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
284 else
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
301 fi
302
303 tx19_files="ChangeLog mips16-opc.c mips-dis.c"
304 if ( 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
312 else
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
329 fi
330
331 tx49_files="ChangeLog mips-opc.c mips-dis.c"
332 if ( 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
340 else
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
357 fi
358
359 tic80_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
360 if ( 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
368 else
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
385 fi
386
387 fr30_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c"
388 if ( 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
396 else
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
413 fi
414
415 coldfire_files="ChangeLog m68k-opc.c"
416 if ( 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
424 else
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
441 fi
442
443 sky_files="ChangeLog Makefile.in Makefile.am configure.in configure disassemble.c mips-dis.c"
444 if ( 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
452 else
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
469 fi
470
471 m32rx_files="ChangeLog m32r-opc.c m32r-opc.h m32r-dis.c m32r-asm.c"
472 if ( 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
480 else
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
499 fi
500
501 nortel_ppc750_files="ChangeLog ppc-opc.c"
502 if ( 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
510 else
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
529 fi
530
531 for 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
535 done
536
537 for 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
545 done
546
547 # This must come after all other sanitizations.  Re-sanitize the .pot
548 # file.
549 if [ -n "${verbose}" ]; then
550    echo Re-computing files for gettext ...
551 fi
552
553 if [ -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
558 fi
559
560 ls -1 *.[ch] cg*.in 2>/dev/null | sed -e 's,^\./,,' > po/POTFILES.in
561
562 if [ -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
567 fi
568
569 # If this fails, Sanitization must fail.
570 xgettext -C -c -k_ -kN_ -f po/POTFILES.in -o po/opcodes.pot || exit 1
571
572 # End of file.
This page took 0.058527 seconds and 4 git commands to generate.