Commit | Line | Data |
---|---|---|
86e4d6e4 | 1 | # Sanitize.in for devo. |
86e4d6e4 RP |
2 | # |
3 | ||
4 | # Each directory to survive it's way into a release will need a file | |
5 | # like this one called "./.Sanitize". All keyword lines must exist, | |
6 | # and must exist in the order specified by this file. Each directory | |
7 | # in the tree will be processed, top down, in the following order. | |
8 | ||
9 | # Hash started lines like this one are comments and will be deleted | |
10 | # before anything else is done. Blank lines will also be squashed | |
11 | # out. | |
12 | ||
13 | # The lines between the "Do-first:" line and the "Things-to-keep:" | |
14 | # line are executed as a /bin/sh shell script before anything else is | |
15 | # done in this | |
16 | ||
17 | Do-first: | |
18 | ||
19 | echo Sanitizing `pwd`... | |
20 | ||
21 | # All files listed between the "Things-to-keep:" line and the | |
22 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
23 | # Directories listed in this section will have their own Sanitize | |
24 | # called. Directories not listed will be removed in their entirety | |
25 | # with rm -rf. | |
26 | ||
27 | Things-to-keep: | |
28 | ||
29 | ChangeLog | |
0ce51ae9 | 30 | Makefile.dos |
86e4d6e4 | 31 | Makefile.in |
9c994225 | 32 | NEWS |
5a77e916 | 33 | README |
86e4d6e4 RP |
34 | TODO |
35 | alloca.c | |
5a77e916 | 36 | am29k-pinsn.c |
05b47bfb | 37 | ar.1 |
5a77e916 | 38 | ar.c |
c0cc6912 | 39 | arlex.l |
aef3999f | 40 | arparse.y |
c0cc6912 SC |
41 | arsup.c |
42 | arsup.h | |
c83497f5 | 43 | binutils.texi |
86e4d6e4 | 44 | bucomm.c |
5a77e916 | 45 | bucomm.h |
0ce51ae9 | 46 | configure.bat |
86e4d6e4 | 47 | configure.in |
e49dde89 | 48 | config |
86e4d6e4 | 49 | copy.c |
86e4d6e4 RP |
50 | filemode.c |
51 | gmalloc.c | |
60c80016 | 52 | i386-pinsn.c |
86e4d6e4 | 53 | i960-pinsn.c |
5a77e916 SC |
54 | is-ranlib.c |
55 | is-strip.c | |
86e4d6e4 | 56 | m68k-pinsn.c |
5a77e916 SC |
57 | maybe-ranlib.c |
58 | maybe-strip.c | |
59 | nm.1 | |
86e4d6e4 | 60 | nm.c |
5a77e916 SC |
61 | not-ranlib.c |
62 | not-strip.c | |
63 | objdump.1 | |
86e4d6e4 | 64 | objdump.c |
5a77e916 SC |
65 | objdump.h |
66 | ranlib.1 | |
06a97fbd | 67 | ranlib.sh |
aef3999f | 68 | sanity.sh |
5a77e916 | 69 | size.1 |
86e4d6e4 RP |
70 | size.c |
71 | sparc-pinsn.c | |
5a77e916 | 72 | strip.1 |
86e4d6e4 RP |
73 | version.c |
74 | ||
75 | Do-last: | |
76 | ||
5d138676 | 77 | v9dirty="sparc-pinsn.c" |
86e4d6e4 | 78 | |
5d138676 JG |
79 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then |
80 | echo Keeping v9 in ${v9dirty} | |
81 | else | |
82 | for i in ${v9dirty} ; do | |
83 | echo Sanitizing v9 in $i | |
84 | rm -f new | |
85 | sed '/^#ifndef[ ]NO_V9/,/^#endif/d' < $i > new | |
86 | if grep -s -i v9 new ; then | |
87 | echo ***** SANITIZING V9 IN $i FAILED *****\a\a | |
88 | fi | |
89 | if [ -n "${safe}" ] ; then | |
90 | mv $i .Recover | |
91 | else | |
92 | rm $i | |
93 | fi | |
94 | mv new $i | |
95 | done | |
96 | fi |