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