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 | ||
86e4d6e4 RP |
19 | |
20 | # All files listed between the "Things-to-keep:" line and the | |
21 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
22 | # Directories listed in this section will have their own Sanitize | |
23 | # called. Directories not listed will be removed in their entirety | |
24 | # with rm -rf. | |
25 | ||
26 | Things-to-keep: | |
27 | ||
28 | ChangeLog | |
0ce51ae9 | 29 | Makefile.dos |
86e4d6e4 | 30 | Makefile.in |
9c994225 | 31 | NEWS |
5a77e916 | 32 | README |
86e4d6e4 RP |
33 | TODO |
34 | alloca.c | |
5a77e916 | 35 | am29k-pinsn.c |
05b47bfb | 36 | ar.1 |
5a77e916 | 37 | ar.c |
c0cc6912 | 38 | arlex.l |
aef3999f | 39 | arparse.y |
c0cc6912 SC |
40 | arsup.c |
41 | arsup.h | |
c83497f5 | 42 | binutils.texi |
86e4d6e4 | 43 | bucomm.c |
5a77e916 | 44 | bucomm.h |
0ce51ae9 | 45 | configure.bat |
86e4d6e4 | 46 | configure.in |
e49dde89 | 47 | config |
86e4d6e4 | 48 | copy.c |
86e4d6e4 RP |
49 | filemode.c |
50 | gmalloc.c | |
60c80016 | 51 | i386-pinsn.c |
86e4d6e4 | 52 | i960-pinsn.c |
5a77e916 SC |
53 | is-ranlib.c |
54 | is-strip.c | |
86e4d6e4 | 55 | m68k-pinsn.c |
5a77e916 SC |
56 | maybe-ranlib.c |
57 | maybe-strip.c | |
58 | nm.1 | |
86e4d6e4 | 59 | nm.c |
5a77e916 SC |
60 | not-ranlib.c |
61 | not-strip.c | |
62 | objdump.1 | |
86e4d6e4 | 63 | objdump.c |
5a77e916 SC |
64 | objdump.h |
65 | ranlib.1 | |
06a97fbd | 66 | ranlib.sh |
aef3999f | 67 | sanity.sh |
5a77e916 | 68 | size.1 |
86e4d6e4 RP |
69 | size.c |
70 | sparc-pinsn.c | |
5a77e916 | 71 | strip.1 |
86e4d6e4 RP |
72 | version.c |
73 | ||
74 | Do-last: | |
75 | ||
5d138676 | 76 | v9dirty="sparc-pinsn.c" |
86e4d6e4 | 77 | |
5d138676 JG |
78 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then |
79 | echo Keeping v9 in ${v9dirty} | |
80 | else | |
81 | for i in ${v9dirty} ; do | |
82 | echo Sanitizing v9 in $i | |
83 | rm -f new | |
84 | sed '/^#ifndef[ ]NO_V9/,/^#endif/d' < $i > new | |
85 | if grep -s -i v9 new ; then | |
86 | echo ***** SANITIZING V9 IN $i FAILED *****\a\a | |
87 | fi | |
88 | if [ -n "${safe}" ] ; then | |
89 | mv $i .Recover | |
90 | else | |
91 | rm $i | |
92 | fi | |
93 | mv new $i | |
94 | done | |
95 | fi |