1 # .Sanitize for devo/gas.
3 # Each directory to survive its 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.
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
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 directory.
18 # All files listed between the "Things-to-keep:" line and the
19 # "Files-to-sed:" line will be kept. All other files will be removed.
20 # Directories listed in this section will have their own Sanitize
21 # called. Directories not listed will be removed in their entirety
120 if ( echo $* | grep keep\-gm > /dev/null ) ; then
122 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
123 if [ -n "${verbose}" ] ; then
124 echo Keeping gm stuff in $i
130 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
131 if [ -n "${verbose}" ] ; then
132 echo Removing traces of \"gm\" from $i...
135 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
136 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
137 if [ -n "${verbose}" ] ; then
138 echo Caching $i in .Recover...
148 v850_files="ChangeLog configure.in configure"
149 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
150 for i in $v850_files ; do
151 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
152 if [ -n "${verbose}" ] ; then
153 echo Keeping v850e stuff in $i
158 for i in $v850_files ; do
159 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
160 if [ -n "${verbose}" ] ; then
161 echo Removing traces of \"v850e\" from $i...
164 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
165 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
166 if [ -n "${verbose}" ] ; then
167 echo Caching $i in .Recover...
176 r5900_files="ChangeLog"
177 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
178 for i in $r5900_files ; do
179 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
180 if [ -n "${verbose}" ] ; then
181 echo Keeping r5900 stuff in $i
186 for i in $r5900_files ; do
187 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Removing traces of \"r5900\" from $i...
192 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
193 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
194 if [ -n "${verbose}" ] ; then
195 echo Caching $i in .Recover...
204 tx19_files="ChangeLog"
205 if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
206 for i in $tx19_files ; do
207 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
208 if [ -n "${verbose}" ] ; then
209 echo Keeping tx19 stuff in $i
214 for i in $tx19_files ; do
215 if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
216 if [ -n "${verbose}" ] ; then
217 echo Removing traces of \"tx19\" from $i...
220 sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
221 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
222 if [ -n "${verbose}" ] ; then
223 echo Caching $i in .Recover...
232 tic80_files="ChangeLog configure.in configure"
233 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
234 for i in $tic80_files ; do
235 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
236 if [ -n "${verbose}" ] ; then
237 echo Keeping tic80 stuff in $i
242 for i in $tic80_files ; do
243 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
244 if [ -n "${verbose}" ] ; then
245 echo Removing traces of \"tic80\" from $i...
248 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
249 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
250 if [ -n "${verbose}" ] ; then
251 echo Caching $i in .Recover...
260 d30v_files="ChangeLog configure configure.in"
261 if ( echo $* | grep keep\-d30v > /dev/null ) ; then
262 for i in $d30v_files ; do
263 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
264 if [ -n "${verbose}" ] ; then
265 echo Keeping d30v stuff in $i
270 for i in $d30v_files ; do
271 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
272 if [ -n "${verbose}" ] ; then
273 echo Removing traces of \"d30v\" from $i...
276 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
277 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
278 if [ -n "${verbose}" ] ; then
279 echo Caching $i in .Recover...
288 if [ -n "${verbose}" ] ; then
289 echo Processing \"sh4\"...
292 sh4_files="ChangeLog"
293 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
294 for i in $sh4_files ; do
295 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
296 if [ -n "${verbose}" ] ; then
297 echo Keeping sh4 stuff in $i
302 for i in $sh4_files ; do
303 if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
304 if [ -n "${verbose}" ] ; then
305 echo Removing traces of \"sh4\" from $i...
308 sed -e '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/d' -e 's/.*restore\-sanitize\-sh4//' < $i > new
309 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
310 if [ -n "${verbose}" ] ; then
311 echo Caching $i in .Recover...
321 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
322 echo '***' Some mentions of Sanitize are still left in $i! 1>&2