run sanitize over Makefile.{am,in} for fr30
[deliverable/binutils-gdb.git] / gas / .Sanitize
1 # .Sanitize for devo/gas
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 lose_these_too=""
19 for d in obsolete regress regress.m68k testscripts ; do
20 if [ -d $d ]; then
21 lose_these_too="${lose_these_too} $d"
22 fi
23 done
24
25 # Remember the current list of files in config.
26 if test -d config; then
27 gas_config_files=`cd config; echo *`
28 else
29 gas_config_files=
30 fi
31
32 # All files listed between the "Things-to-keep:" line and the
33 # "Do-last:" line will be kept. All other files will be removed.
34 # Directories listed in this section will have their own Sanitize
35 # called. Directories not listed will be removed in their entirety
36 # with rm -rf.
37
38 Things-to-keep:
39
40 CONTRIBUTORS
41 COPYING
42 ChangeLog
43 ChangeLog-9295
44 ChangeLog-9697
45 Makefile.am
46 Makefile.in
47 NEWS
48 README
49 README-vms
50 acconfig.h
51 acinclude.m4
52 aclocal.m4
53 app.c
54 as.c
55 as.h
56 asintl.h
57 atof-generic.c
58 bignum-copy.c
59 bignum.h
60 bit_fix.h
61 cgen.c
62 cgen.h
63 cond.c
64 config
65 config-gas.com
66 config.in
67 configure
68 configure.bat
69 configure.in
70 debug.c
71 dep-in.sed
72 depend.c
73 doc
74 ecoff.c
75 ecoff.h
76 ehopt.c
77 emul-target.h
78 emul.h
79 expr.c
80 expr.h
81 flonum-copy.c
82 flonum-konst.c
83 flonum-mult.c
84 flonum.h
85 frags.c
86 frags.h
87 gasp.c
88 gdbinit.in
89 hash.c
90 hash.h
91 input-file.c
92 input-file.h
93 input-scrub.c
94 itbl-lex.l
95 itbl-ops.c
96 itbl-ops.h
97 itbl-parse.y
98 link.cmd
99 listing.c
100 listing.h
101 literal.c
102 mac-as.r
103 macro.c
104 macro.h
105 makefile.vms
106 messages.c
107 mpw-config.in
108 mpw-make.sed
109 obj.h
110 output-file.c
111 output-file.h
112 po
113 read.c
114 read.h
115 sb.c
116 sb.h
117 stabs.c
118 stamp-h.in
119 struc-symbol.h
120 subsegs.c
121 subsegs.h
122 symbols.c
123 symbols.h
124 tc.h
125 testsuite
126 vmsconf.sh
127 write.c
128 write.h
129
130 Things-to-lose:
131
132
133
134 # The lines between the "Do-last:" line and the end of the file
135 # are executed as a /bin/sh shell script after everything else is
136 # done.
137
138 Do-last:
139
140 v850_files="ChangeLog ChangeLog-9697 configure.in configure"
141 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
142 for i in $v850_files ; do
143 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
144 if [ -n "${verbose}" ] ; then
145 echo Keeping v850e stuff in $i
146 fi
147 fi
148 done
149 else
150 for i in $v850_files ; do
151 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
152 if [ -n "${verbose}" ] ; then
153 echo Removing traces of \"v850e\" from $i...
154 fi
155 cp $i new
156 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
157 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
158 if [ -n "${verbose}" ] ; then
159 echo Caching $i in .Recover...
160 fi
161 mv $i .Recover
162 fi
163 mv new $i
164 fi
165 done
166 fi
167
168 r5900_files="ChangeLog ChangeLog-9697 configure configure.in"
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 cygnus_files="ChangeLog ChangeLog-9697"
197 if ( echo $* | grep keep\-cygnus > /dev/null ) ; then
198 for i in $cygnus_files ; do
199 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
200 if [ -n "${verbose}" ] ; then
201 echo Keeping cygnus stuff in $i
202 fi
203 fi
204 done
205 else
206 for i in $cygnus_files ; do
207 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
208 if [ -n "${verbose}" ] ; then
209 echo Removing traces of \"cygnus\" from $i...
210 fi
211 cp $i new
212 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/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 tx19_files="ChangeLog ChangeLog-9697"
225 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
226 for i in $tx19_files ; do
227 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
228 if [ -n "${verbose}" ] ; then
229 echo Keeping tx19 stuff in $i
230 fi
231 fi
232 done
233 else
234 for i in $tx19_files ; do
235 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
236 if [ -n "${verbose}" ] ; then
237 echo Removing traces of \"tx19\" from $i...
238 fi
239 cp $i new
240 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/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 tx49_files="ChangeLog ChangeLog-9697"
253 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
254 for i in $tx49_files ; do
255 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
256 if [ -n "${verbose}" ] ; then
257 echo Keeping tx49 stuff in $i
258 fi
259 fi
260 done
261 else
262 for i in $tx49_files ; do
263 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
264 if [ -n "${verbose}" ] ; then
265 echo Removing traces of \"tx49\" from $i...
266 fi
267 cp $i new
268 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/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 tic80_files="ChangeLog ChangeLog-9697 configure.in configure"
281 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
282 for i in $tic80_files ; do
283 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
284 if [ -n "${verbose}" ] ; then
285 echo Keeping tic80 stuff in $i
286 fi
287 fi
288 done
289 else
290 for i in $tic80_files ; do
291 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
292 if [ -n "${verbose}" ] ; then
293 echo Removing traces of \"tic80\" from $i...
294 fi
295 cp $i new
296 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
297 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
298 if [ -n "${verbose}" ] ; then
299 echo Caching $i in .Recover...
300 fi
301 mv $i .Recover
302 fi
303 mv new $i
304 fi
305 done
306 fi
307
308 fr30_files="ChangeLog configure.in configure Makefile.am Makefile.in"
309 if ( echo $* | grep keep\-fr30 > /dev/null ) ; then
310 for i in $fr30_files ; do
311 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
312 if [ -n "${verbose}" ] ; then
313 echo Keeping fr30 stuff in $i
314 fi
315 fi
316 done
317 else
318 for i in $fr30_files ; do
319 if test ! -d $i && (grep sanitize-fr30 $i > /dev/null) ; then
320 if [ -n "${verbose}" ] ; then
321 echo Removing traces of \"fr30\" from $i...
322 fi
323 cp $i new
324 sed '/start\-sanitize\-fr30/,/end-\sanitize\-fr30/d' < $i > new
325 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
326 if [ -n "${verbose}" ] ; then
327 echo Caching $i in .Recover...
328 fi
329 mv $i .Recover
330 fi
331 mv new $i
332 fi
333 done
334 fi
335
336 am33_files="ChangeLog"
337 if ( echo $* | grep keep\-am33 > /dev/null ) ; then
338 for i in $am33_files ; do
339 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
340 if [ -n "${verbose}" ] ; then
341 echo Keeping am33 stuff in $i
342 fi
343 fi
344 done
345 else
346 for i in $am33_files ; do
347 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
348 if [ -n "${verbose}" ] ; then
349 echo Removing traces of \"am33\" from $i...
350 fi
351 cp $i new
352 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/d' < $i > new
353 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
354 if [ -n "${verbose}" ] ; then
355 echo Caching $i in .Recover...
356 fi
357 mv $i .Recover
358 fi
359 mv new $i
360 fi
361 done
362 fi
363
364 m32rx_files="ChangeLog ChangeLog-9697 configure.in configure"
365 if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
366 for i in $m32rx_files ; do
367 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
368 if [ -n "${verbose}" ] ; then
369 echo Keeping m32rx stuff in $i
370 fi
371 fi
372 done
373 else
374 for i in $m32rx_files ; do
375 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
376 if [ -n "${verbose}" ] ; then
377 echo Removing traces of \"m32rx\" from $i...
378 fi
379 cp $i new
380 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/d' < $i > new
381 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
382 if [ -n "${verbose}" ] ; then
383 echo Caching $i in .Recover...
384 fi
385 mv $i .Recover
386 fi
387 mv new $i
388 fi
389 done
390 fi
391 if ( echo $* | grep keep\-phase2\-m32rx > /dev/null ) ; then
392 for i in $m32rx_files ; do
393 if test ! -d $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
394 if [ -n "${verbose}" ] ; then
395 echo Keeping m32rx stuff in $i
396 fi
397 fi
398 done
399 else
400 for i in $m32rx_files ; do
401 if test -r $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
402 if [ -n "${verbose}" ] ; then
403 echo Removing traces of \"m32rx\" from $i...
404 fi
405 cp $i new
406 sed '/start\-sanitize\-phase2\-m32rx/,/end\-sanitize\-phase2\-m32rx/d' < $i > new
407 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
408 if [ -n "${verbose}" ] ; then
409 echo Caching $i in .Recover...
410 fi
411 mv $i .Recover
412 fi
413 mv new $i
414 fi
415 done
416 fi
417
418 sky_files="ChangeLog configure.in configure"
419 if ( echo $* | grep keep\-sky > /dev/null ) ; then
420 for i in $sky_files ; do
421 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
422 if [ -n "${verbose}" ] ; then
423 echo Keeping sky stuff in $i
424 fi
425 fi
426 done
427 else
428 for i in $sky_files ; do
429 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
430 if [ -n "${verbose}" ] ; then
431 echo Removing traces of \"sky\" from $i...
432 fi
433 cp $i new
434 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
435 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
436 if [ -n "${verbose}" ] ; then
437 echo Caching $i in .Recover...
438 fi
439 mv $i .Recover
440 fi
441 mv new $i
442 fi
443 done
444 fi
445
446 vr4320_files="ChangeLog"
447 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
448 for i in $vr4320_files ; do
449 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
450 if [ -n "${verbose}" ] ; then
451 echo Keeping vr4320 stuff in $i
452 fi
453 fi
454 done
455 else
456 for i in $vr4320_files ; do
457 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
458 if [ -n "${verbose}" ] ; then
459 echo Removing traces of \"vr4320\" from $i...
460 fi
461 cp $i new
462 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
463 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
464 if [ -n "${verbose}" ] ; then
465 echo Caching $i in .Recover...
466 fi
467 mv $i .Recover
468 fi
469 mv new $i
470 fi
471 done
472 fi
473
474 branchbug4011_files="ChangeLog"
475 if ( echo $* | grep keep\-branchbug4011 > /dev/null ) ; then
476 for i in $branchbug4011_files ; do
477 if test ! -d $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
478 if [ -n "${verbose}" ] ; then
479 echo Keeping branchbug4011 stuff in $i
480 fi
481 fi
482 done
483 else
484 for i in $branchbug4011_files ; do
485 if test -r $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
486 if [ -n "${verbose}" ] ; then
487 echo Removing traces of \"branchbug4011\" from $i...
488 fi
489 cp $i new
490 sed '/start\-sanitize\-branchbug4011/,/end\-sanitize\-branchbug4011/d' < $i > new
491 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
492 if [ -n "${verbose}" ] ; then
493 echo Caching $i in .Recover...
494 fi
495 mv $i .Recover
496 fi
497 mv new $i
498 fi
499 done
500 fi
501
502 beos_files="ChangeLog configure.in configure"
503 if ( echo $* | grep keep\-beos > /dev/null ) ; then
504 for i in $beos_files ; do
505 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
506 if [ -n "${verbose}" ] ; then
507 echo Keeping beos stuff in $i
508 fi
509 fi
510 done
511 else
512 for i in $beos_files ; do
513 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
514 if [ -n "${verbose}" ] ; then
515 echo Removing traces of \"beos\" from $i...
516 fi
517 cp $i new
518 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/d' < $i > new
519 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
520 if [ -n "${verbose}" ] ; then
521 echo Caching $i in .Recover...
522 fi
523 mv $i .Recover
524 fi
525 mv new $i
526 fi
527 done
528 fi
529
530 for i in * ; do
531 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
532 echo '***' Some mentions of Sanitize are still left in gas/$i! 1>&2
533 fi
534 done
535
536 for lost in .. $lose_these_too; do
537 if test $lost != ..; then
538 for i in Makefile.am Makefile.in configure.in configure; do
539 if fgrep $lost $i >/dev/null 2>&1; then
540 echo '***' File $lost was sanitized out but is still mentioned in gas/$i 1>&2
541 fi
542 done
543 fi
544 done
545
546 # Check each file we removed from gas/config, and make sure it is not
547 # mentioned in Makefiles or configure files.
548 for lost in .. $gas_config_files; do
549 if test $lost != .. && test $lost != CVS; then
550 if test -f config/$lost; then
551 :
552 else
553 for i in Makefile.am Makefile.in configure.in configure; do
554 if fgrep $lost $i >/dev/null 2>&1; then
555 echo '***' File gas/config/$lost was sanitized out but is still mentioned in gas/$i 1>&2
556 fi
557 done
558 fi
559 fi
560 done
561
562 # This must come after all other sanitizations. Re-sanitize the .pot
563 # file.
564 if [ -n "${verbose}" ]; then
565 echo Re-computing files for gettext ...
566 fi
567
568 if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
569 if [ -n "${verbose}" ]; then
570 echo Caching po/POTFILES.in in .Recover...
571 fi
572 mv po/POTFILES.in po/.Recover
573 fi
574 find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
575
576 if [ -n "${safe}" -a ! -f po/.Recover/gas.pot ]; then
577 if [ -n "${verbose}" ]; then
578 echo Caching po/gas.pot in .Recover...
579 fi
580 mv po/gas.pot po/.Recover
581 fi
582 # If this fails, Sanitization must fail.
583 xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/gas.pot || exit 1
584
585 # eof
This page took 0.048572 seconds and 5 git commands to generate.