Commit | Line | Data |
---|---|---|
67c2d8c8 | 1 | # .Sanitize for devo/opcodes. |
a4ccc310 | 2 | |
e7c4e61c | 3 | # Each directory to survive its way into a release will need a file |
a4ccc310 SC |
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 | |
15 | ||
16 | Do-first: | |
17 | ||
e7c4e61c SS |
18 | if ( echo $* | grep keep\-mpw > /dev/null ) ; then |
19 | keep_these_too="mpw-make.in mpw-config.in ChangeLog.mpw" | |
e4c7516b SS |
20 | else |
21 | lose_these_too="mpw-make.in mpw-config.in ChangeLog.mpw" | |
22 | fi | |
23 | ||
a4ccc310 SC |
24 | # All files listed between the "Things-to-keep:" line and the |
25 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
26 | # Directories listed in this section will have their own Sanitize | |
27 | # called. Directories not listed will be removed in their entirety | |
28 | # with rm -rf. | |
29 | ||
30 | Things-to-keep: | |
87756e15 | 31 | |
a4ccc310 | 32 | ChangeLog |
add1fb05 | 33 | Makefile.in |
5f8f6d56 SC |
34 | alpha-dis.c |
35 | alpha-opc.h | |
720b3aed | 36 | a29k-dis.c |
fc984fdb | 37 | configure.bat |
add1fb05 | 38 | configure.in |
117733ad | 39 | dis-buf.c |
204c9148 | 40 | disassemble.c |
3b4cc5ec | 41 | h8300-dis.c |
337110ea SC |
42 | h8500-dis.c |
43 | h8500-opc.h | |
cfa8d061 | 44 | hppa-dis.c |
c840244e | 45 | i386-dis.c |
720b3aed | 46 | i960-dis.c |
c840244e | 47 | m68k-dis.c |
a4c01299 | 48 | m88k-dis.c |
bf1dd2fd | 49 | mips-dis.c |
69135a69 | 50 | mips-opc.c |
89221bd5 ILT |
51 | ppc-dis.c |
52 | ppc-opc.c | |
8679a71f SC |
53 | sh-opc.h |
54 | sh-dis.c | |
117733ad | 55 | sparc-dis.c |
c3a1191a | 56 | sparc-opc.c |
add1fb05 | 57 | z8k-dis.c |
a4ccc310 | 58 | z8k-opc.h |
ea2598e4 | 59 | z8kgen.c |
5f8f6d56 SC |
60 | alpha-opc.h |
61 | alpha-dis.c | |
add1fb05 | 62 | |
87756e15 RP |
63 | Things-to-lose: |
64 | ||
775d4a40 | 65 | |
62ba1060 SC |
66 | Do-last: |
67 | ||
7b85349f RP |
68 | if ( echo $* | egrep verbose > /dev/null ) ; then |
69 | verbose=true | |
70 | else | |
71 | verbose= | |
72 | fi | |
8679a71f | 73 | |
62ba1060 | 74 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then |
7b85349f RP |
75 | if [ -n "${verbose}" ] ; then |
76 | echo Keeping v9 in sparc-opc.c | |
77 | fi | |
62ba1060 | 78 | else |
7b85349f RP |
79 | if [ -n "${verbose}" ] ; then |
80 | echo Sanitizing v9 in sparc-opc.c | |
81 | fi | |
62ba1060 SC |
82 | rm -f new |
83 | grep -v v9 sparc-opc.c > new | |
84 | if [ -n "${safe}" ] ; then | |
85 | mv sparc-opc.c .Recover | |
86 | else | |
87 | rm sparc-opc.c | |
88 | fi | |
89 | mv new sparc-opc.c | |
90 | fi | |
a4ccc310 | 91 | |
f7ed13c7 | 92 | |
117733ad | 93 | v9dirty="sparc-dis.c" |
f7ed13c7 JK |
94 | |
95 | if ( echo $* | grep keep\-v9 > /dev/null ) ; then | |
7b85349f RP |
96 | if [ -n "${verbose}" ] ; then |
97 | echo Keeping v9 in ${v9dirty} | |
98 | fi | |
f7ed13c7 JK |
99 | else |
100 | for i in ${v9dirty} ; do | |
7b85349f RP |
101 | if [ -n "${verbose}" ] ; then |
102 | echo Sanitizing v9 in $i | |
103 | fi | |
f7ed13c7 JK |
104 | rm -f new |
105 | sed '/^#ifndef[ ]NO_V9/,/^#endif/d' < $i > new | |
106 | if grep -s -i v9 new ; then | |
7b85349f | 107 | echo '***' SANITIZING V9 IN $i FAILED *****\a\a 1>&2 |
f7ed13c7 JK |
108 | fi |
109 | if [ -n "${safe}" ] ; then | |
110 | mv $i .Recover | |
111 | else | |
112 | rm $i | |
113 | fi | |
114 | mv new $i | |
115 | done | |
116 | fi | |
a4ccc310 | 117 | # End of file. |