Add switches to control AIX multlibs
[deliverable/binutils-gdb.git] / .Sanitize
1 ########################
2 #
3 # H H EEEEEE Y Y !!
4 # H H E Y Y !!
5 # H H E Y Y !!
6 # H H E Y !!
7 # HHHHHH EEEEE Y !!
8 # H H E Y !!
9 # H H E Y !!
10 # H H E Y
11 # H H EEEEEE Y !!
12 #
13 # YO! READ ME!!!!!!!!!
14 # If you're about to add a file or directory which isn't checked out as part
15 # of every module in devo (e.g., if "cvs co gas+utils" won't get it, or if
16 # "cvs co gcc" won't get it), then don't, Don't, DON'T add it to the regular
17 # things-to-keep or things-to-lose sections. Instead, add it to the setting
18 # of keep_these_too or lose_these_too before those variables are rescanned
19 # to check for the existence of the items listed in them.
20 #
21 # Otherwise, somebody will check out some package that doesn't include your
22 # new file, and will get warnings from Sanitize when everything is really
23 # okay. You don't want to get people in the habit of ignoring complaints from
24 # Sanitize, do you? No, I didn't think so.
25 #
26 # If you do add a file to the regular things-to-keep section, don't forget
27 # to add the corresponding entry to the devo-support entry (or whatever) in
28 # the modules file.
29 #
30 ########################
31
32 # .Sanitize for devo.
33
34 # Each directory to survive its way into a release will need a file
35 # like this one called "./.Sanitize". All keyword lines must exist,
36 # and must exist in the order specified by this file. Each directory
37 # in the tree will be processed, top down, in the following order.
38
39 # Hash started lines like this one are comments and will be deleted
40 # before anything else is done. Blank lines will also be squashed
41 # out.
42
43 # The lines between the "Do-first:" line and the "Things-to-keep:"
44 # line are executed as a /bin/sh shell script before anything else is
45 # done in this directory.
46
47 Do-first:
48
49 keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf
50 bfd binutils byacc cvs deja-gnu dejagnu diff dosrel dvips emacs emacs19
51 examples expect fileutils flex
52 gas gcc gdb gdbm gdbtest glob gprof grep grez groff
53 include install.sh ispell
54 ld libg++ libgcc libgloss libiberty libio librx libstdc++
55 m4 make mmalloc move-if-change newlib opcodes
56 pagas patch prms rcs readline sed send-pr shellutils sim textutils
57 texinfo tgas utils uudecode wdiff xiberty
58 configure.bat makeall.bat winsup
59 ctax gls goonix guile guile-docs libguile slib
60 mpw-README mpw-configure mpw-config.in mpw-build.in"
61
62 lose_these_too="${lose_these_too} testsuite"
63
64 cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB"
65
66 if ( echo $* | grep keep\-cygnus > /dev/null) ; then
67 keep_these_too="${keep_these_too} ${cygnus_files}"
68 else
69 lose_these_too="${lose_these_too} ${cygnus_files}"
70 fi
71
72 gdbtk_files="tcl tk"
73
74 if ( echo $* | grep lose\-gdbtk > /dev/null) ; then
75 lose_these_too="${lose_these_too} ${gdbtk_files}"
76 if [ -n "${verbose}" ] ; then
77 echo Deleting ${gdbtk_files}
78 fi
79 else
80 keep_these_too="${keep_these_too} ${gdbtk_files}"
81 if [ -n "${verbose}" ] ; then
82 echo Keeping ${gdbtk_files}
83 fi
84 fi
85
86 # This is for newlib net releases.
87 newlib_file="COPYING.NEWLIB"
88
89 if (echo $* | grep keep\-newlib > /dev/null) ; then
90 if (echo $* | grep -v keep\-cygnus > /dev/null) ; then
91 keep_these_too="${keep_these_too} ${newlib_file}"
92 lose_these_too="`echo ${lose_these_too} | sed -e s/${newlib_file}//`"
93 fi
94 else
95 true; # Let keep-cygnus handle it.
96 fi
97
98 # This top-level directory is special. We often check out only subsets
99 # of this directory, and complaining about directories or files we didn't
100 # check out just gets obnoxious.
101
102 list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`"
103 keep_these_too=
104
105 for file in $list ; do
106 if [ -r $file ] || [ -d $file ] ; then
107 keep_these_too="${keep_these_too} $file"
108 fi
109 done
110
111 list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` "
112 lose_these_too=
113
114 for file in $list ; do
115 if [ -r $file ] || [ -d $file ] ; then
116 lose_these_too="${lose_these_too} $file"
117 fi
118 done
119
120 # All files listed between the "Things-to-keep:" line and the
121 # "Do-last:" line will be kept. All other files will be removed.
122 # Directories listed in this section will have their own Sanitize
123 # called. Directories not listed will be removed in their entirety
124 # with rm -rf.
125
126 Things-to-keep:
127
128 COPYING
129 COPYING.LIB
130 ChangeLog
131 Makefile.in
132 README
133 config
134 config-ml.in
135 config.guess
136 config.sub
137 configure
138 configure.in
139 etc
140 symlink-tree
141
142 Things-to-lose:
143
144 # The lines between the "Do-last:" line and the end of the file
145 # are executed as a /bin/sh shell script after everything else is
146 # done.
147
148 Do-last:
149
150 # Don't try to clean directories here, as the 'mv' command will fail.
151 # Also, grep fails on NFS mounted directories.
152
153 if ( echo $* | egrep verbose > /dev/null ) ; then
154 verbose=true
155 else
156 verbose=
157 fi
158
159 # Remove "sanitize-Sanitize" lines.
160 if [ -n "${verbose}" ] ; then
161 echo Cleaning unconditional sanitizations out of Makefile.in...
162 fi
163 cp Makefile.in new
164 sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
165 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
166 mv Makefile.in .Recover
167 fi
168 mv new Makefile.in
169
170 if [ -n "${verbose}" ] ; then
171 echo Thawing away the \"chill\"...
172 fi
173
174 if ( echo $* | grep keep\-chill > /dev/null ) ; then
175 for i in * ; do
176 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
177 if [ -n "${verbose}" ] ; then
178 echo Keeping chill stuff in $i
179 fi
180 fi
181 done
182 else
183 for i in * ; do
184 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
185 if [ -n "${verbose}" ] ; then
186 echo Thawing the \"chill\" out of $i...
187 fi
188 cp $i new
189 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
190 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
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
201 if [ -n "${verbose}" ] ; then
202 echo Processing \"arc\"...
203 fi
204
205 arc_files="config.sub configure.in config-ml.in"
206
207 if ( echo $* | grep keep\-arc > /dev/null ) ; then
208 for i in $arc_files ; do
209 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
210 if [ -n "${verbose}" ] ; then
211 echo Keeping arc stuff in $i
212 fi
213 fi
214 done
215 else
216 for i in * ; do
217 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
218 if [ -n "${verbose}" ] ; then
219 echo Removing traces of \"arc\" from $i...
220 fi
221 cp $i new
222 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
223 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
224 if [ -n "${verbose}" ] ; then
225 echo Caching $i in .Recover...
226 fi
227 mv $i .Recover
228 fi
229 mv new $i
230 fi
231 done
232 fi
233
234 rce_files="config.sub"
235
236 if ( echo $* | grep keep\-rce > /dev/null ) ; then
237 for i in $rce_files ; do
238 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
239 if [ -n "${verbose}" ] ; then
240 echo Keeping rce stuff in $i
241 fi
242 fi
243 done
244 else
245 for i in $rce_files ; do
246 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
247 if [ -n "${verbose}" ] ; then
248 echo Removing traces of \"rce\" from $i...
249 fi
250 cp $i new
251 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
252 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
253 if [ -n "${verbose}" ] ; then
254 echo Caching $i in .Recover...
255 fi
256 mv $i .Recover
257 fi
258 mv new $i
259 fi
260 done
261 fi
262
263 sh3e_files="ChangeLog config-ml.in"
264 if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
265 for i in $sh3e_files ; do
266 if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
267 if [ -n "${verbose}" ] ; then
268 echo Keeping sh3e stuff in $i
269 fi
270 fi
271 done
272 else
273 for i in $sh3e_files ; do
274 if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
275 if [ -n "${verbose}" ] ; then
276 echo Removing traces of \"sh3e\" from $i...
277 fi
278 cp $i new
279 sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/d' < $i > new
280 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
281 if [ -n "${verbose}" ] ; then
282 echo Caching $i in .Recover...
283 fi
284 mv $i .Recover
285 fi
286 mv new $i
287 fi
288 done
289 fi
290
291
292 if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
293 echo Catering to RMS by removing traces of \"gdbtk\"...
294 if [ -n "${verbose}" ] ; then
295 echo Removing traces of \"gdbtk\" from Makefile.in...
296 fi
297 cp Makefile.in new
298 sed -e '/GDBTK_SUPPORT_DIRS=/d' -e 's/ $(GDBTK_SUPPORT_DIRS)//' < Makefile.in > new
299 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
300 if [ -n "${verbose}" ] ; then
301 echo Caching Makefile.in in .Recover...
302 fi
303 mv Makefile.in .Recover
304 fi
305 mv new Makefile.in
306 fi
307
308 if ( echo $* | grep keep\-gm > /dev/null ) ; then
309 for i in * ; do
310 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
311 if [ -n "${verbose}" ] ; then
312 echo Keeping gm stuff in $i
313 fi
314 fi
315 done
316 else
317 for i in * ; do
318 if test ! -d $i && (grep sanitize-gm $i > /dev/null) ; then
319 if [ -n "${verbose}" ] ; then
320 echo Removing traces of \"gm\" from $i...
321 fi
322 cp $i new
323 sed '/start\-sanitize\-gm/,/end-\sanitize\-gm/d' < $i > new
324 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
325 if [ -n "${verbose}" ] ; then
326 echo Caching $i in .Recover...
327 fi
328 mv $i .Recover
329 fi
330 mv new $i
331 fi
332 done
333 fi
334
335 # Do this check LAST!
336 for i in * ; do
337 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
338 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
339 exit 1
340 fi
341 done
342
343 # eof
This page took 0.037654 seconds and 4 git commands to generate.