]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/.Sanitize
temporarily sanitize fr30
[thirdparty/binutils-gdb.git] / gas / .Sanitize
CommitLineData
e33bfde7 1# .Sanitize for devo/gas
d4d5412d 2
4f5d16c7 3# Each directory to survive its way into a release will need a file
d4d5412d
RP
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
a6148eeb 14# done in this directory.
d4d5412d
RP
15
16Do-first:
17
1f4d2212
KR
18lose_these_too=""
19for d in obsolete regress regress.m68k testscripts ; do
20 if [ -d $d ]; then
21 lose_these_too="${lose_these_too} $d"
22 fi
23done
24
6e60709b
ILT
25# Remember the current list of files in config.
26if test -d config; then
27 gas_config_files=`cd config; echo *`
28else
29 gas_config_files=
30fi
31
d4d5412d 32# All files listed between the "Things-to-keep:" line and the
e33bfde7 33# "Do-last:" line will be kept. All other files will be removed.
d4d5412d
RP
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
38Things-to-keep:
39
eee109cd 40CONTRIBUTORS
d4d5412d
RP
41COPYING
42ChangeLog
0378333b
ILT
43ChangeLog-9295
44ChangeLog-9697
e2b4bd2a 45Makefile.am
d4d5412d 46Makefile.in
eee109cd 47NEWS
d4d5412d 48README
eee109cd 49README-vms
6e71a03b 50acconfig.h
e2b4bd2a 51acinclude.m4
6e71a03b 52aclocal.m4
d4d5412d
RP
53app.c
54as.c
55as.h
e33bfde7 56asintl.h
d4d5412d 57atof-generic.c
d4d5412d
RP
58bignum-copy.c
59bignum.h
eee109cd 60bit_fix.h
374bdac7 61cgen.c
defc70bf 62cgen.h
d4d5412d
RP
63cond.c
64config
003acb2d 65config-gas.com
e33bfde7 66config.in
6e71a03b 67configure
c593cf41 68configure.bat
d4d5412d
RP
69configure.in
70debug.c
65d7de4f 71dep-in.sed
663282f0 72depend.c
a262a1b2 73doc
9faec336
ILT
74ecoff.c
75ecoff.h
ffd652c3 76ehopt.c
511cd41c
KR
77emul-target.h
78emul.h
d4d5412d
RP
79expr.c
80expr.h
d4d5412d 81flonum-copy.c
eee109cd 82flonum-konst.c
d4d5412d
RP
83flonum-mult.c
84flonum.h
85frags.c
86frags.h
a5a4b5ac 87gasp.c
aa4f6c56 88gdbinit.in
d4d5412d
RP
89hash.c
90hash.h
d4d5412d
RP
91input-file.c
92input-file.h
93input-scrub.c
8e5c905e
DP
94itbl-lex.l
95itbl-ops.c
96itbl-ops.h
97itbl-parse.y
e33bfde7
ILT
98link.cmd
99listing.c
100listing.h
101literal.c
4c72b6a7 102mac-as.r
7e047ac2
ILT
103macro.c
104macro.h
f649d525 105makefile.vms
d4d5412d 106messages.c
0fb26eac 107mpw-config.in
4c72b6a7 108mpw-make.sed
d4d5412d 109obj.h
d4d5412d
RP
110output-file.c
111output-file.h
e33bfde7 112po
d4d5412d
RP
113read.c
114read.h
7e047ac2
ILT
115sb.c
116sb.h
29249b42 117stabs.c
e2b4bd2a 118stamp-h.in
d4d5412d
RP
119struc-symbol.h
120subsegs.c
121subsegs.h
122symbols.c
123symbols.h
124tc.h
f70a4714 125testsuite
be2fc7ec 126vmsconf.sh
d4d5412d
RP
127write.c
128write.h
d4d5412d 129
87756e15
RP
130Things-to-lose:
131
e33bfde7
ILT
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
d4d5412d
RP
138Do-last:
139
0378333b 140v850_files="ChangeLog ChangeLog-9697 configure.in configure"
a365cd79
NC
141if ( 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
149else
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
166fi
276c2d7d 167
0378333b 168r5900_files="ChangeLog ChangeLog-9697 configure configure.in"
276c2d7d
GRK
169if ( 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
177else
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
c6aa56bc
C
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
194fi
195
3d759c53
KR
196cygnus_files="ChangeLog ChangeLog-9697"
197if ( 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
aa2e0460 200 if [ -n "${verbose}" ] ; then
3d759c53 201 echo Keeping cygnus stuff in $i
aa2e0460
KR
202 fi
203 fi
204 done
205else
3d759c53
KR
206 for i in $cygnus_files ; do
207 if test ! -d $i && (grep sanitize-cygnus $i > /dev/null) ; then
aa2e0460 208 if [ -n "${verbose}" ] ; then
3d759c53 209 echo Removing traces of \"cygnus\" from $i...
aa2e0460
KR
210 fi
211 cp $i new
3d759c53 212 sed '/start\-sanitize\-cygnus/,/end-\sanitize\-cygnus/d' < $i > new
aa2e0460
KR
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
222fi
223
0378333b 224tx19_files="ChangeLog ChangeLog-9697"
318b499d
GRK
225if ( 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
233else
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
250fi
251
0378333b 252tx49_files="ChangeLog ChangeLog-9697"
605ca21a
ILT
253if ( 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
261else
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
278fi
279
0378333b 280tic80_files="ChangeLog ChangeLog-9697 configure.in configure"
64556643
FF
281if ( 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
289else
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
306fi
307
82169ece
JL
308am33_files="ChangeLog"
309if ( echo $* | grep keep\-am33 > /dev/null ) ; then
310 for i in $am33_files ; do
311 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
312 if [ -n "${verbose}" ] ; then
313 echo Keeping am33 stuff in $i
314 fi
315 fi
316 done
317else
318 for i in $am33_files ; do
319 if test ! -d $i && (grep sanitize-am33 $i > /dev/null) ; then
320 if [ -n "${verbose}" ] ; then
321 echo Removing traces of \"am33\" from $i...
322 fi
323 cp $i new
324 sed '/start\-sanitize\-am33/,/end-\sanitize\-am33/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
334fi
335
0378333b 336m32rx_files="ChangeLog ChangeLog-9697 configure.in configure"
d745e6d9
NC
337if ( echo $* | grep keep\-m32rx > /dev/null ) ; then
338 for i in $m32rx_files ; do
339 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
340 if [ -n "${verbose}" ] ; then
341 echo Keeping m32rx stuff in $i
342 fi
343 fi
344 done
345else
346 for i in $m32rx_files ; do
347 if test ! -d $i && (grep sanitize-m32rx $i > /dev/null) ; then
348 if [ -n "${verbose}" ] ; then
349 echo Removing traces of \"m32rx\" from $i...
350 fi
351 cp $i new
352 sed '/start\-sanitize\-m32rx/,/end-\sanitize\-m32rx/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
362fi
8ca85ce0
DE
363if ( echo $* | grep keep\-phase2\-m32rx > /dev/null ) ; then
364 for i in $m32rx_files ; do
365 if test ! -d $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
366 if [ -n "${verbose}" ] ; then
367 echo Keeping m32rx stuff in $i
368 fi
369 fi
370 done
371else
372 for i in $m32rx_files ; do
373 if test -r $i && (grep sanitize\-phase2\-m32rx $i > /dev/null) ; then
374 if [ -n "${verbose}" ] ; then
375 echo Removing traces of \"m32rx\" from $i...
376 fi
377 cp $i new
378 sed '/start\-sanitize\-phase2\-m32rx/,/end\-sanitize\-phase2\-m32rx/d' < $i > new
379 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
380 if [ -n "${verbose}" ] ; then
381 echo Caching $i in .Recover...
382 fi
383 mv $i .Recover
384 fi
385 mv new $i
386 fi
387 done
388fi
d745e6d9 389
103dd764
DE
390sky_files="ChangeLog configure.in configure"
391if ( echo $* | grep keep\-sky > /dev/null ) ; then
392 for i in $sky_files ; do
393 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
394 if [ -n "${verbose}" ] ; then
395 echo Keeping sky stuff in $i
396 fi
397 fi
398 done
399else
400 for i in $sky_files ; do
401 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
402 if [ -n "${verbose}" ] ; then
403 echo Removing traces of \"sky\" from $i...
404 fi
405 cp $i new
406 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
407 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
ed70a335
GRK
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
416fi
417
2d035a50
GRK
418vr4320_files="ChangeLog"
419if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
420 for i in $vr4320_files ; do
421 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
422 if [ -n "${verbose}" ] ; then
423 echo Keeping vr4320 stuff in $i
424 fi
425 fi
426 done
427else
428 for i in $vr4320_files ; do
429 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
430 if [ -n "${verbose}" ] ; then
431 echo Removing traces of \"vr4320\" from $i...
432 fi
433 cp $i new
434 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/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
444fi
445
b08a983c
GRK
446branchbug4011_files="ChangeLog"
447if ( echo $* | grep keep\-branchbug4011 > /dev/null ) ; then
448 for i in $branchbug4011_files ; do
449 if test ! -d $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
450 if [ -n "${verbose}" ] ; then
451 echo Keeping branchbug4011 stuff in $i
452 fi
453 fi
454 done
455else
456 for i in $branchbug4011_files ; do
457 if test -r $i && (grep sanitize-branchbug4011 $i > /dev/null) ; then
458 if [ -n "${verbose}" ] ; then
459 echo Removing traces of \"branchbug4011\" from $i...
460 fi
461 cp $i new
462 sed '/start\-sanitize\-branchbug4011/,/end\-sanitize\-branchbug4011/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
472fi
473
c86d82ee
RH
474beos_files="ChangeLog configure.in configure"
475if ( echo $* | grep keep\-beos > /dev/null ) ; then
476 for i in $beos_files ; do
477 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
478 if [ -n "${verbose}" ] ; then
479 echo Keeping beos stuff in $i
480 fi
481 fi
482 done
483else
484 for i in $beos_files ; do
485 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
486 if [ -n "${verbose}" ] ; then
487 echo Removing traces of \"beos\" from $i...
488 fi
489 cp $i new
490 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/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
500fi
501
5c680afd 502for i in * ; do
af98e836
ILT
503 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
504 echo '***' Some mentions of Sanitize are still left in gas/$i! 1>&2
505 fi
5c680afd
MT
506done
507
af98e836
ILT
508for lost in .. $lose_these_too; do
509 if test $lost != ..; then
510 for i in Makefile.am Makefile.in configure.in configure; do
511 if fgrep $lost $i >/dev/null 2>&1; then
512 echo '***' File $lost was sanitized out but is still mentioned in gas/$i 1>&2
513 fi
514 done
515 fi
516done
3d96e9b4 517
6e60709b
ILT
518# Check each file we removed from gas/config, and make sure it is not
519# mentioned in Makefiles or configure files.
520for lost in .. $gas_config_files; do
3eb82b4e 521 if test $lost != .. && test $lost != CVS; then
6e60709b
ILT
522 if test -f config/$lost; then
523 :
524 else
525 for i in Makefile.am Makefile.in configure.in configure; do
526 if fgrep $lost $i >/dev/null 2>&1; then
527 echo '***' File gas/config/$lost was sanitized out but is still mentioned in gas/$i 1>&2
528 fi
529 done
530 fi
531 fi
532done
533
3d96e9b4
TT
534# This must come after all other sanitizations. Re-sanitize the .pot
535# file.
536if [ -n "${verbose}" ]; then
537 echo Re-computing files for gettext ...
538fi
539
540if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
541 if [ -n "${verbose}" ]; then
542 echo Caching po/POTFILES.in in .Recover...
543 fi
544 mv po/POTFILES.in po/.Recover
545fi
546find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
547
548if [ -n "${safe}" -a ! -f po/.Recover/gas.pot ]; then
549 if [ -n "${verbose}" ]; then
550 echo Caching po/gas.pot in .Recover...
551 fi
552 mv po/gas.pot po/.Recover
553fi
d6f3da9b 554# If this fails, Sanitization must fail.
ee66b572 555xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/gas.pot || exit 1
3d96e9b4 556
e33bfde7 557# eof