Commit | Line | Data |
---|---|---|
30989ea5 | 1 | # .Sanitize for devo/include/opcode. |
1ee1fd7e SC |
2 | |
3 | # Each directory to survive it's way into a release will need a file | |
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 | ||
30989ea5 DE |
18 | arc_files="arc.h" |
19 | ||
20 | if ( echo $* | grep keep\-arc > /dev/null ) ; then | |
21 | keep_these_too="${arc_files} ${keep_these_too}" | |
22 | else | |
23 | lose_these_too="${arc_files} ${lose_these_too}" | |
24 | fi | |
25 | ||
a048df07 MH |
26 | d30v_files="d30v.h" |
27 | ||
28 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then | |
29 | keep_these_too="${d30v_files} ${keep_these_too}" | |
30 | else | |
31 | lose_these_too="${d30v_files} ${lose_these_too}" | |
32 | fi | |
33 | ||
7a3c9336 C |
34 | v850_files="v850.h" |
35 | ||
36 | if ( echo $* | grep keep\-v850 > /dev/null ) ; then | |
37 | keep_these_too="${v850_files} ${keep_these_too}" | |
38 | else | |
39 | lose_these_too="${v850_files} ${lose_these_too}" | |
40 | fi | |
41 | ||
3665f0d5 FF |
42 | tic80_files="tic80.h" |
43 | ||
44 | if ( echo $* | grep keep\-tic80 > /dev/null ) ; then | |
45 | keep_these_too="${tic80_files} ${keep_these_too}" | |
46 | else | |
47 | lose_these_too="${tic80_files} ${lose_these_too}" | |
48 | fi | |
49 | ||
30989ea5 | 50 | |
1ee1fd7e SC |
51 | # All files listed between the "Things-to-keep:" line and the |
52 | # "Files-to-sed:" line will be kept. All other files will be removed. | |
53 | # Directories listed in this section will have their own Sanitize | |
54 | # called. Directories not listed will be removed in their entirety | |
55 | # with rm -rf. | |
56 | ||
57 | Things-to-keep: | |
58 | ||
59 | ChangeLog | |
60 | a29k.h | |
3853da56 | 61 | alpha.h |
1ee1fd7e | 62 | arm.h |
21d9662b | 63 | convex.h |
54d26e15 | 64 | d10v.h |
1ee1fd7e | 65 | h8300.h |
76b731f9 | 66 | hppa.h |
1ee1fd7e SC |
67 | i386.h |
68 | i860.h | |
69 | i960.h | |
70 | m68k.h | |
71 | m88k.h | |
72 | mips.h | |
ae1b99e4 JL |
73 | mn10200.h |
74 | mn10300.h | |
1ee1fd7e SC |
75 | np1.h |
76 | ns32k.h | |
77 | pn.h | |
a8146de4 | 78 | ppc.h |
1ee1fd7e SC |
79 | pyr.h |
80 | sparc.h | |
81 | tahoe.h | |
82 | vax.h | |
83 | ||
87756e15 RP |
84 | Things-to-lose: |
85 | ||
1ee1fd7e SC |
86 | Do-last: |
87 | ||
30989ea5 DE |
88 | arc_files="ChangeLog" |
89 | if ( echo $* | grep keep\-arc > /dev/null ) ; then | |
90 | for i in $arc_files ; do | |
91 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
92 | if [ -n "${verbose}" ] ; then | |
93 | echo Keeping arc stuff in $i | |
94 | fi | |
95 | fi | |
96 | done | |
97 | else | |
98 | for i in $arc_files ; do | |
99 | if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then | |
100 | if [ -n "${verbose}" ] ; then | |
101 | echo Removing traces of \"arc\" from $i... | |
102 | fi | |
103 | cp $i new | |
104 | sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new | |
105 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
106 | if [ -n "${verbose}" ] ; then | |
107 | echo Caching $i in .Recover... | |
108 | fi | |
109 | mv $i .Recover | |
110 | fi | |
111 | mv new $i | |
112 | fi | |
113 | done | |
114 | fi | |
115 | ||
3d1d21b0 | 116 | |
a048df07 MH |
117 | d30v_files="ChangeLog" |
118 | if ( echo $* | grep keep\-d30v > /dev/null ) ; then | |
119 | for i in $d30v_files ; do | |
120 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then | |
121 | if [ -n "${verbose}" ] ; then | |
122 | echo Keeping d30v stuff in $i | |
123 | fi | |
124 | fi | |
125 | done | |
126 | else | |
127 | for i in $d30v_files ; do | |
128 | if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then | |
129 | if [ -n "${verbose}" ] ; then | |
130 | echo Removing traces of \"d30v\" from $i... | |
131 | fi | |
132 | cp $i new | |
133 | sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new | |
134 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
135 | if [ -n "${verbose}" ] ; then | |
136 | echo Caching $i in .Recover... | |
137 | fi | |
138 | mv $i .Recover | |
139 | fi | |
140 | mv new $i | |
141 | fi | |
142 | done | |
143 | fi | |
144 | ||
7a3c9336 C |
145 | v850_files="ChangeLog" |
146 | if ( echo $* | grep keep\-v850 > /dev/null ) ; then | |
147 | for i in $v850_files ; do | |
148 | if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then | |
149 | if [ -n "${verbose}" ] ; then | |
150 | echo Keeping v850 stuff in $i | |
151 | fi | |
152 | fi | |
153 | done | |
154 | else | |
155 | for i in $v850_files ; do | |
156 | if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then | |
157 | if [ -n "${verbose}" ] ; then | |
158 | echo Removing traces of \"v850\" from $i... | |
159 | fi | |
160 | cp $i new | |
161 | sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new | |
162 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
276c2d7d GRK |
163 | if [ -n "${verbose}" ] ; then |
164 | echo Caching $i in .Recover... | |
165 | fi | |
166 | mv $i .Recover | |
167 | fi | |
168 | mv new $i | |
169 | fi | |
170 | done | |
171 | fi | |
172 | ||
173 | r5900_files="ChangeLog mips.h" | |
174 | if ( echo $* | grep keep\-r5900 > /dev/null ) ; then | |
175 | for i in $r5900_files ; do | |
176 | if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then | |
177 | if [ -n "${verbose}" ] ; then | |
178 | echo Keeping r5900 stuff in $i | |
179 | fi | |
180 | fi | |
181 | done | |
182 | else | |
183 | for i in $r5900_files ; do | |
184 | if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then | |
185 | if [ -n "${verbose}" ] ; then | |
186 | echo Removing traces of \"r5900\" from $i... | |
187 | fi | |
188 | cp $i new | |
189 | sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new | |
190 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
7a3c9336 C |
191 | if [ -n "${verbose}" ] ; then |
192 | echo Caching $i in .Recover... | |
193 | fi | |
194 | mv $i .Recover | |
195 | fi | |
196 | mv new $i | |
197 | fi | |
198 | done | |
199 | fi | |
200 | ||
3665f0d5 FF |
201 | tic80_files="ChangeLog" |
202 | if ( echo $* | grep keep\-tic80 > /dev/null ) ; then | |
203 | for i in $tic80_files ; do | |
204 | if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then | |
205 | if [ -n "${verbose}" ] ; then | |
206 | echo Keeping tic80 stuff in $i | |
207 | fi | |
208 | fi | |
209 | done | |
210 | else | |
211 | for i in $tic80_files ; do | |
212 | if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then | |
213 | if [ -n "${verbose}" ] ; then | |
214 | echo Removing traces of \"tic80\" from $i... | |
215 | fi | |
216 | cp $i new | |
217 | sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new | |
218 | if [ -n "${safe}" -a ! -f .Recover/$i ] ; then | |
219 | if [ -n "${verbose}" ] ; then | |
220 | echo Caching $i in .Recover... | |
221 | fi | |
222 | mv $i .Recover | |
223 | fi | |
224 | mv new $i | |
225 | fi | |
226 | done | |
227 | fi | |
228 | ||
7a3c9336 | 229 | |
30989ea5 DE |
230 | for i in * ; do |
231 | if test ! -d $i && (grep sanitize $i > /dev/null) ; then | |
232 | echo '***' Some mentions of Sanitize are still left in $i! 1>&2 | |
233 | fi | |
234 | done | |
235 | ||
1ee1fd7e | 236 | # End of file. |