(Laying the groundwork (that will be incrementally fleshed out) for
[deliverable/binutils-gdb.git] / include / opcode / .Sanitize
1 # .Sanitize for devo/include/opcode.
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
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
26 d10v_files="d10v.h"
27
28 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
29 keep_these_too="${d10v_files} ${keep_these_too}"
30 else
31 lose_these_too="${d10v_files} ${lose_these_too}"
32 fi
33
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
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
50
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
61 alpha.h
62 arm.h
63 convex.h
64 h8300.h
65 hppa.h
66 i386.h
67 i860.h
68 i960.h
69 m68k.h
70 m88k.h
71 mips.h
72 mn10200.h
73 mn10300.h
74 np1.h
75 ns32k.h
76 pn.h
77 ppc.h
78 pyr.h
79 sparc.h
80 tahoe.h
81 vax.h
82
83 Things-to-lose:
84
85 Do-last:
86
87 arc_files="ChangeLog"
88 if ( echo $* | grep keep\-arc > /dev/null ) ; then
89 for i in $arc_files ; do
90 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
91 if [ -n "${verbose}" ] ; then
92 echo Keeping arc stuff in $i
93 fi
94 fi
95 done
96 else
97 for i in $arc_files ; do
98 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
99 if [ -n "${verbose}" ] ; then
100 echo Removing traces of \"arc\" from $i...
101 fi
102 cp $i new
103 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
104 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
105 if [ -n "${verbose}" ] ; then
106 echo Caching $i in .Recover...
107 fi
108 mv $i .Recover
109 fi
110 mv new $i
111 fi
112 done
113 fi
114
115
116 d10v_files="ChangeLog"
117 if ( echo $* | grep keep\-d10v > /dev/null ) ; then
118 for i in $d10v_files ; do
119 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
120 if [ -n "${verbose}" ] ; then
121 echo Keeping d10v stuff in $i
122 fi
123 fi
124 done
125 else
126 for i in $d10v_files ; do
127 if test ! -d $i && (grep sanitize-d10v $i > /dev/null) ; then
128 if [ -n "${verbose}" ] ; then
129 echo Removing traces of \"d10v\" from $i...
130 fi
131 cp $i new
132 sed '/start\-sanitize\-d10v/,/end-\sanitize\-d10v/d' < $i > new
133 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
134 if [ -n "${verbose}" ] ; then
135 echo Caching $i in .Recover...
136 fi
137 mv $i .Recover
138 fi
139 mv new $i
140 fi
141 done
142 fi
143
144 v850_files="ChangeLog"
145 if ( echo $* | grep keep\-v850 > /dev/null ) ; then
146 for i in $v850_files ; do
147 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
148 if [ -n "${verbose}" ] ; then
149 echo Keeping v850 stuff in $i
150 fi
151 fi
152 done
153 else
154 for i in $v850_files ; do
155 if test ! -d $i && (grep sanitize-v850 $i > /dev/null) ; then
156 if [ -n "${verbose}" ] ; then
157 echo Removing traces of \"v850\" from $i...
158 fi
159 cp $i new
160 sed '/start\-sanitize\-v850/,/end-\sanitize\-v850/d' < $i > new
161 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
162 if [ -n "${verbose}" ] ; then
163 echo Caching $i in .Recover...
164 fi
165 mv $i .Recover
166 fi
167 mv new $i
168 fi
169 done
170 fi
171
172 tic80_files="ChangeLog"
173 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
174 for i in $tic80_files ; do
175 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
176 if [ -n "${verbose}" ] ; then
177 echo Keeping tic80 stuff in $i
178 fi
179 fi
180 done
181 else
182 for i in $tic80_files ; do
183 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
184 if [ -n "${verbose}" ] ; then
185 echo Removing traces of \"tic80\" from $i...
186 fi
187 cp $i new
188 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
189 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
190 if [ -n "${verbose}" ] ; then
191 echo Caching $i in .Recover...
192 fi
193 mv $i .Recover
194 fi
195 mv new $i
196 fi
197 done
198 fi
199
200
201 for i in * ; do
202 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
203 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
204 fi
205 done
206
207 # End of file.
This page took 0.037946 seconds and 5 git commands to generate.