fix for pr 3571
[deliverable/binutils-gdb.git] / .Sanitize
CommitLineData
43e36dd2 1# .Sanitize for devo.
a93b3c77
RP
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
43e36dd2 14# done in this directory.
a93b3c77
RP
15
16Do-first:
17
5d4ec851 18if ( echo $* | grep keep\-chill > /dev/null ) ; then
e90de1f5 19 keep_these_too="chillrt test-chill"
5d4ec851
FF
20fi
21
7d0eab7b
DZ
22if ( echo $* | grep keep\-cygnus > /dev/null) ; then
23 keep_these_too="${keep_these_too} release release-info"
24fi
25
26
a93b3c77 27# All files listed between the "Things-to-keep:" line and the
43e36dd2 28# "Do-last:" line will be kept. All other files will be removed.
a93b3c77
RP
29# Directories listed in this section will have their own Sanitize
30# called. Directories not listed will be removed in their entirety
31# with rm -rf.
32
33Things-to-keep:
34
c9b36b5f 35.cvsignore
6e37b215
PB
36COPYING
37COPYING.LIB
6227a92b 38CYGNUS
57d32184 39ChangeLog
a93b3c77 40Makefile.in
965a9f14 41README
28f760d3 42autoconf
d5eb68fa 43bfd
ebec4684 44binutils
4e0c2de7 45build-all.mk
6a2d7603 46byacc
a93b3c77 47config
5cc24596 48config.guess
db2de419 49config.sub
a93b3c77 50configure
e72c4b3a 51configure.bat
a93b3c77 52configure.in
cdabe523 53cvs
8ec1b2a1 54deja-gnu
d623fd7e 55dejagnu
5781b1ba 56diff
4e0c2de7 57dvips
cdabe523 58emacs
701df845 59etc
17519312 60expect
4e0c2de7 61fileutils
49df2308 62flex
a93b3c77 63gas
ebec4684
RP
64gcc
65gdb
f3d3d2cd 66gdbm
e72c4b3a 67gdbtest
f7f4df6a 68glob
9a14a29d 69gprof
5781b1ba 70grep
4e0c2de7 71groff
a93b3c77 72include
4a01dc52 73install.sh
2dbd15d2 74ispell
ebec4684 75ld
0862386b 76libg++
e72c4b3a
RP
77libgcc
78libiberty
7c4dd2c8 79libio
4e0c2de7 80m4
cdabe523 81make
d592622a 82mmalloc
e72c4b3a 83move-if-change
6ae8fff5 84newlib
aa06ff7e 85opcodes
57d32184 86patch
d42563da 87prms
3c8735af 88rcs
a93b3c77 89readline
4e0c2de7 90sed
00d8b290 91send-pr
4e0c2de7 92shellutils
da7e4b5c 93sim
17519312 94tcl
4e0c2de7
DZ
95textutils
96tk
c9b36b5f 97test-build.mk
d239963b 98texinfo
14bed8ee 99tgas
fa64be8d 100uudecode
4e0c2de7
DZ
101wdiff
102xiberty
a93b3c77 103
87756e15
RP
104Things-to-lose:
105
43e36dd2
RP
106# The lines between the "Do-last:" line and the end of the file
107# are executed as a /bin/sh shell script after everything else is
108# done.
109
a93b3c77
RP
110Do-last:
111
7b85349f
RP
112if ( echo $* | egrep verbose > /dev/null ) ; then
113 verbose=true
114else
115 verbose=
116fi
117
118if [ -n "${verbose}" ] ; then
119 echo Looking for signs of \"v9\"...
120fi
eebff21c
JG
121
122# Don't try to clean directories here, as the 'mv' command will fail.
123# Also, grep fails on NFS mounted directories.
124if ( echo $* | grep keep\-v9 > /dev/null ) ; then
125 for i in * ; do
126 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
7b85349f
RP
127 if [ -n "${verbose}" ] ; then
128 echo Keeping v9 stuff in $i
129 fi
eebff21c
JG
130 fi
131 done
132else
133 for i in * ; do
134 if test ! -d $i && (grep sanitize-v9 $i > /dev/null) ; then
7b85349f
RP
135 if [ -n "${verbose}" ] ; then
136 echo Cleaning the \"v9\" out of $i...
137 fi
e00efef1 138 cp $i new
eebff21c
JG
139 sed '/start\-sanitize\-v9/,/end-\sanitize\-v9/d' < $i > new
140 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
141 mv $i .Recover
142 fi
143 mv new $i
eebff21c
JG
144 fi
145 done
146fi
147
7b85349f
RP
148if [ -n "${verbose}" ] ; then
149 echo Thawing away the \"chill\"...
150fi
5d4ec851
FF
151
152# Don't try to clean directories here, as the 'mv' command will fail.
153# Also, grep fails on NFS mounted directories.
154if ( echo $* | grep keep\-chill > /dev/null ) ; then
155 for i in * ; do
156 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
157 if [ -n "${verbose}" ] ; then
158 echo Keeping chill stuff in $i
159 fi
5d4ec851
FF
160 fi
161 done
162else
163 for i in * ; do
164 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
165 if [ -n "${verbose}" ] ; then
166 echo Thawing the \"chill\" out of $i...
167 fi
5d4ec851
FF
168 cp $i new
169 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
170 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
7b85349f
RP
171 if [ -n "${verbose}" ] ; then
172 echo Caching $i in .Recover...
173 fi
5d4ec851
FF
174 mv $i .Recover
175 fi
176 mv new $i
177 fi
178 done
5d4ec851
FF
179fi
180
5357f128
KR
181if ( echo $* | grep for\-fsf > /dev/null ) ; then
182 if [ -n "${verbose}" ]; then
183 echo Cleaning up configure.in for FSF release...
184 fi
185 sed '/start\-sanitize\-for\-fsf/,/end\-sanitize\-for\-fsf/d' < configure.in > new
186 if [ -n "${safe}" -a ! -f .Recover/$i ]; then
187 if [ -n "${verbose}" ]; then
188 echo Caching configure.in in .Recover...
189 fi
190 mv configure.in .Recover
191 fi
192 mv new configure.in
193else
194 if [ -n "${verbose}" ]; then
195 echo Removing sanitize-for-fsf markers from configure.in...
196 fi
197 grep -v sanitize-for-fsf < configure.in > new
198 if [ -n "${safe}" ]; then
199 if [ -n "${verbose}" ]; then
200 echo Caching configure.in in .Recover...
201 fi
202 mv configure.in .Recover
203 fi
204 mv new configure.in
205fi
206
e11b54be
PB
207for i in * ; do
208 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
7b85349f 209 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
e11b54be
PB
210 fi
211done
57d32184
RP
212
213# eof
This page took 0.083062 seconds and 4 git commands to generate.