* config/tc-ppc.h (OBJ_XCOFF): Define if OBJ_COFF and not TE_PE.
[deliverable/binutils-gdb.git] / .Sanitize
CommitLineData
694ea471 1########################
3a58da89
KR
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#
694ea471
KR
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.
9719168f
DE
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#
694ea471
KR
30########################
31
3a58da89
KR
32# .Sanitize for devo.
33
5db7ecb7 34# Each directory to survive its way into a release will need a file
a93b3c77
RP
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
43e36dd2 45# done in this directory.
a93b3c77
RP
46
47Do-first:
48
1ed0529e 49keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf
e03b0bca
KR
50 bfd binutils byacc cvs deja-gnu dejagnu diff dosrel dvips emacs emacs19
51 examples expect fileutils flex gas gcc gdb gdbm gdbtest glob gprof grep
52 groff include install.sh ispell ld libg++ libgcc libgloss libiberty
f38cb096 53 libio librx libstdc++ m4 make mmalloc move-if-change newlib opcodes
85f903e9
FF
54 pagas patch prms rcs readline sed send-pr shellutils sim textutils
55 texinfo tgas utils uudecode wdiff xiberty
694ea471
KR
56 configure.bat makeall.bat
57 mpw-README mpw-configure mpw-config.in mpw-build.in"
58
59lose_these_too="${lose_these_too} testsuite"
e03b0bca 60
2822305b 61cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB"
96c805d8 62
7d0eab7b 63if ( echo $* | grep keep\-cygnus > /dev/null) ; then
96c805d8 64 keep_these_too="${keep_these_too} ${cygnus_files}"
80cad9cc 65else
96c805d8 66 lose_these_too="${lose_these_too} ${cygnus_files}"
7d0eab7b
DZ
67fi
68
fc5a05e9
SS
69gdbtk_files="tcl tk"
70
71if ( echo $* | grep lose\-gdbtk > /dev/null) ; then
72 lose_these_too="${lose_these_too} ${gdbtk_files}"
73 if [ -n "${verbose}" ] ; then
74 echo Deleting ${gdbtk_files}
75 fi
76else
77 keep_these_too="${keep_these_too} ${gdbtk_files}"
78 if [ -n "${verbose}" ] ; then
79 echo Keeping ${gdbtk_files}
80 fi
5db7ecb7 81fi
7d0eab7b 82
77cbdd35 83# This is for newlib net releases.
c8205c90 84newlib_file="COPYING.NEWLIB"
77cbdd35 85
c8205c90
DE
86if (echo $* | grep keep\-newlib > /dev/null) ; then
87 if (echo $* | grep -v keep\-cygnus > /dev/null) ; then
88 keep_these_too="${keep_these_too} ${newlib_file}"
89 lose_these_too="`echo ${lose_these_too} | sed -e s/${newlib_file}//`"
90 fi
77cbdd35 91else
c8205c90 92 true; # Let keep-cygnus handle it.
77cbdd35
DE
93fi
94
e03b0bca
KR
95# This top-level directory is special. We often check out only subsets
96# of this directory, and complaining about directories or files we didn't
97# check out just gets obnoxious.
98
694ea471 99list="`(for i in ${keep_these_too}; do echo $i ; done) | sort -u`"
e03b0bca
KR
100keep_these_too=
101
102for file in $list ; do
103 if [ -r $file ] || [ -d $file ] ; then
104 keep_these_too="${keep_these_too} $file"
105 fi
106done
107
694ea471 108list="`(for i in ${lose_these_too}; do echo $i ; done) | sort -u` "
e03b0bca
KR
109lose_these_too=
110
111for file in $list ; do
112 if [ -r $file ] || [ -d $file ] ; then
113 lose_these_too="${lose_these_too} $file"
114 fi
115done
116
a93b3c77 117# All files listed between the "Things-to-keep:" line and the
43e36dd2 118# "Do-last:" line will be kept. All other files will be removed.
a93b3c77
RP
119# Directories listed in this section will have their own Sanitize
120# called. Directories not listed will be removed in their entirety
121# with rm -rf.
122
9719168f
DE
123# ??? It is debatable whether cfg-*.in belongs in Things-to-keep or
124# keep_these_too. If someone feels strongly about it, please move them.
125
a93b3c77
RP
126Things-to-keep:
127
6e37b215
PB
128COPYING
129COPYING.LIB
57d32184 130ChangeLog
a93b3c77 131Makefile.in
965a9f14 132README
a93b3c77 133config
8c2d15d1
DE
134cfg-ml-com.in
135cfg-ml-pos.in
5cc24596 136config.guess
db2de419 137config.sub
a93b3c77
RP
138configure
139configure.in
701df845 140etc
a93b3c77 141
87756e15
RP
142Things-to-lose:
143
43e36dd2
RP
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
a93b3c77
RP
148Do-last:
149
bf150019
DE
150# Don't try to clean directories here, as the 'mv' command will fail.
151# Also, grep fails on NFS mounted directories.
152
7b85349f
RP
153if ( echo $* | egrep verbose > /dev/null ) ; then
154 verbose=true
155else
156 verbose=
157fi
158
eecef7ef
FF
159# Remove "sanitize-Sanitize" lines.
160if [ -n "${verbose}" ] ; then
161 echo Cleaning unconditional sanitizations out of Makefile.in...
162fi
163cp Makefile.in new
164sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
165if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
166 mv Makefile.in .Recover
167fi
168mv new Makefile.in
169
7b85349f
RP
170if [ -n "${verbose}" ] ; then
171 echo Thawing away the \"chill\"...
172fi
5d4ec851 173
5d4ec851
FF
174if ( echo $* | grep keep\-chill > /dev/null ) ; then
175 for i in * ; do
176 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
177 if [ -n "${verbose}" ] ; then
178 echo Keeping chill stuff in $i
179 fi
5d4ec851
FF
180 fi
181 done
182else
183 for i in * ; do
184 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
185 if [ -n "${verbose}" ] ; then
186 echo Thawing the \"chill\" out of $i...
187 fi
5d4ec851
FF
188 cp $i new
189 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
190 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
7b85349f
RP
191 if [ -n "${verbose}" ] ; then
192 echo Caching $i in .Recover...
193 fi
5d4ec851
FF
194 mv $i .Recover
195 fi
196 mv new $i
197 fi
198 done
5d4ec851
FF
199fi
200
86118528
KR
201if [ -n "${verbose}" ] ; then
202 echo Processing \"arc\"...
203fi
204
f162a6a1 205arc_files="config.sub configure.in cfg-ml-com.in"
bf150019 206
86118528 207if ( echo $* | grep keep\-arc > /dev/null ) ; then
bf150019 208 for i in $arc_files ; do
86118528
KR
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
215else
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
bf150019
DE
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
232fi
233
234psion_files="config.sub configure.in"
235
236if ( echo $* | grep keep\-psion > /dev/null ) ; then
237 for i in $psion_files; do
238 if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then
239 if [ -n "${verbose}" ] ; then
240 echo Keeping psion stuff in $i
241 fi
242 fi
243 done
244else
245 for i in * ; do
246 if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then
247 if [ -n "${verbose}" ] ; then
248 echo Removing traces of \"psion\" from $i...
249 fi
250 cp $i new
251 sed '/start\-sanitize\-psion/,/end-\sanitize\-psion/d' < $i > new
86118528
KR
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
261fi
262
03c4ce2f 263rce_files="config.sub"
5c680afd 264
03c4ce2f
MT
265if ( echo $* | grep keep\-rce > /dev/null ) ; then
266 for i in $rce_files ; do
267 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
5c680afd 268 if [ -n "${verbose}" ] ; then
03c4ce2f 269 echo Keeping rce stuff in $i
5c680afd
MT
270 fi
271 fi
272 done
273else
03c4ce2f
MT
274 for i in $rce_files ; do
275 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
5c680afd 276 if [ -n "${verbose}" ] ; then
03c4ce2f 277 echo Removing traces of \"rce\" from $i...
5c680afd
MT
278 fi
279 cp $i new
03c4ce2f 280 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
5c680afd
MT
281 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
282 if [ -n "${verbose}" ] ; then
283 echo Caching $i in .Recover...
284 fi
285 mv $i .Recover
286 fi
287 mv new $i
288 fi
289 done
290fi
291
bc55a53f
C
292sh3e_files="ChangeLog cfg-ml-com.in"
293if ( echo $* | grep keep\-sh3e > /dev/null ) ; then
294 for i in $sh3e_files ; do
295 if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
296 if [ -n "${verbose}" ] ; then
297 echo Keeping sh3e stuff in $i
298 fi
299 fi
300 done
301else
302 for i in $sh3e_files ; do
303 if test ! -d $i && (grep sanitize-sh3e $i > /dev/null) ; then
304 if [ -n "${verbose}" ] ; then
305 echo Removing traces of \"sh3e\" from $i...
306 fi
307 cp $i new
308 sed '/start\-sanitize\-sh3e/,/end-\sanitize\-sh3e/d' < $i > new
309 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
310 if [ -n "${verbose}" ] ; then
311 echo Caching $i in .Recover...
312 fi
313 mv $i .Recover
314 fi
315 mv new $i
316 fi
317 done
318fi
319
320
aa800755
FF
321if ( echo $* | grep lose\-gdbtk > /dev/null ) ; then
322 echo Catering to RMS by removing traces of \"gdbtk\"...
323 if [ -n "${verbose}" ] ; then
324 echo Removing traces of \"gdbtk\" from Makefile.in...
325 fi
326 cp Makefile.in new
327 sed -e '/GDBTK_SUPPORT_DIRS=/d' -e 's/ $(GDBTK_SUPPORT_DIRS)//' < Makefile.in > new
328 if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
329 if [ -n "${verbose}" ] ; then
330 echo Caching Makefile.in in .Recover...
331 fi
332 mv Makefile.in .Recover
333 fi
334 mv new Makefile.in
335fi
336
e11b54be
PB
337for i in * ; do
338 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
7b85349f 339 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
e11b54be
PB
340 fi
341done
57d32184
RP
342
343# eof
This page took 0.151514 seconds and 4 git commands to generate.