* configure.in: Use "e" rather than "em_" as prefix for
[binutils-gdb.git] / .Sanitize
1 # .Sanitize for devo.
2
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.
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 directory.
15
16 Do-first:
17
18 cygnus_files="release release-info build-all.mk"
19
20 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
21 keep_these_too="${keep_these_too} ${cygnus_files}"
22 else
23 lose_these_too="${lose_these_too} ${cygnus_files}"
24 fi
25
26 mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw"
27
28 if ( echo $* | grep keep\-mpw > /dev/null) ; then
29 keep_these_too="${keep_these_too} ${mpw_files}"
30 else
31 lose_these_too="${lose_these_too} ${mpw_files}"
32 fi
33
34 # All files listed between the "Things-to-keep:" line and the
35 # "Do-last:" line will be kept. All other files will be removed.
36 # Directories listed in this section will have their own Sanitize
37 # called. Directories not listed will be removed in their entirety
38 # with rm -rf.
39
40 Things-to-keep:
41
42 .cvsignore
43 COPYING
44 COPYING.LIB
45 CYGNUS
46 ChangeLog
47 Makefile.in
48 README
49 autoconf
50 bfd
51 binutils
52 byacc
53 config
54 config.guess
55 config.sub
56 configure
57 configure.in
58 cvs
59 deja-gnu
60 dejagnu
61 diff
62 dvips
63 emacs
64 etc
65 expect
66 fileutils
67 flex
68 gas
69 gcc
70 gdb
71 gdbm
72 gdbtest
73 glob
74 gprof
75 grep
76 groff
77 include
78 install.sh
79 ispell
80 ld
81 libg++
82 libgcc
83 libiberty
84 libio
85 m4
86 make
87 mmalloc
88 move-if-change
89 newlib
90 opcodes
91 pagas
92 patch
93 prms
94 rcs
95 readline
96 sed
97 send-pr
98 shellutils
99 sim
100 tcl
101 textutils
102 tk
103 test-build.mk
104 texinfo
105 tgas
106 utils
107 uudecode
108 wdiff
109 xiberty
110
111 Things-to-lose:
112
113 # The lines between the "Do-last:" line and the end of the file
114 # are executed as a /bin/sh shell script after everything else is
115 # done.
116
117 Do-last:
118
119 if ( echo $* | egrep verbose > /dev/null ) ; then
120 verbose=true
121 else
122 verbose=
123 fi
124
125 # Remove "sanitize-Sanitize" lines.
126 if [ -n "${verbose}" ] ; then
127 echo Cleaning unconditional sanitizations out of Makefile.in...
128 fi
129 cp Makefile.in new
130 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
131 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
132 mv Makefile.in .Recover
133 fi
134 mv new Makefile.in
135
136 if [ -n "${verbose}" ] ; then
137 echo Looking for signs of \"v9\"...
138 fi
139
140 # Don't try to clean directories here, as the 'mv' command will fail.
141 # Also, grep fails on NFS mounted directories.
142 if ( echo $* | grep keep\-v9 > /dev/null ) ; then
143 for i in * ; do
144 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
145 if [ -n "${verbose}" ] ; then
146 echo Keeping v9 stuff in $i
147 fi
148 fi
149 done
150 else
151 for i in * ; do
152 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
153 if [ -n "${verbose}" ] ; then
154 echo Cleaning the \"v9\" out of $i...
155 fi
156 cp $i new
157 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
158 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
159 mv $i .Recover
160 fi
161 mv new $i
162 fi
163 done
164 fi
165
166 if [ -n "${verbose}" ] ; then
167 echo Thawing away the \"chill\"...
168 fi
169
170 # Don't try to clean directories here, as the 'mv' command will fail.
171 # Also, grep fails on NFS mounted directories.
172 if ( echo $* | grep keep\-chill > /dev/null ) ; then
173 for i in * ; do
174 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
175 if [ -n "${verbose}" ] ; then
176 echo Keeping chill stuff in $i
177 fi
178 fi
179 done
180 else
181 for i in * ; do
182 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
183 if [ -n "${verbose}" ] ; then
184 echo Thawing the \"chill\" out of $i...
185 fi
186 cp $i new
187 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
188 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
189 if [ -n "${verbose}" ] ; then
190 echo Caching $i in .Recover...
191 fi
192 mv $i .Recover
193 fi
194 mv new $i
195 fi
196 done
197 fi
198
199 if [ -n "${verbose}" ] ; then
200 echo Removing traces of \"mpw\"...
201 fi
202
203 # Don't try to clean directories here, as the 'mv' command will fail.
204 # Also, grep fails on NFS mounted directories.
205 if ( echo $* | grep keep\-mpw > /dev/null ) ; then
206 for i in * ; do
207 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
208 if [ -n "${verbose}" ] ; then
209 echo Keeping mpw stuff in $i
210 fi
211 fi
212 done
213 else
214 for i in * ; do
215 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
216 if [ -n "${verbose}" ] ; then
217 echo Removing traces of \"mpw\" from $i...
218 fi
219 cp $i new
220 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
221 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
222 if [ -n "${verbose}" ] ; then
223 echo Caching $i in .Recover...
224 fi
225 mv $i .Recover
226 fi
227 mv new $i
228 fi
229 done
230 fi
231
232 for i in * ; do
233 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
234 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
235 fi
236 done
237
238 # eof