add ld-versados.
[deliverable/binutils-gdb.git] / .Sanitize
CommitLineData
43e36dd2 1# .Sanitize for devo.
a93b3c77 2
5db7ecb7 3# Each directory to survive its way into a release will need a file
a93b3c77
RP
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
1ed0529e 18keep_these_too="${keep_these_too} .cvsignore CYGNUS autoconf
e03b0bca
KR
19 bfd binutils byacc cvs deja-gnu dejagnu diff dosrel dvips emacs emacs19
20 examples expect fileutils flex gas gcc gdb gdbm gdbtest glob gprof grep
21 groff include install.sh ispell ld libg++ libgcc libgloss libiberty
f38cb096
JM
22 libio librx libstdc++ m4 make mmalloc move-if-change newlib opcodes
23 pagas patch prms rcs readline sed send-pr shellutils sim tcl textutils
2822305b 24 tk texinfo tgas utils uudecode wdiff xiberty"
e03b0bca 25
2822305b 26cygnus_files="release release-info build-all.mk test-build.mk COPYING.NEWLIB"
96c805d8 27
7d0eab7b 28if ( echo $* | grep keep\-cygnus > /dev/null) ; then
96c805d8 29 keep_these_too="${keep_these_too} ${cygnus_files}"
80cad9cc 30else
96c805d8 31 lose_these_too="${lose_these_too} ${cygnus_files}"
7d0eab7b
DZ
32fi
33
fc5a05e9
SS
34gdbtk_files="tcl tk"
35
36if ( echo $* | grep lose\-gdbtk > /dev/null) ; then
37 lose_these_too="${lose_these_too} ${gdbtk_files}"
38 if [ -n "${verbose}" ] ; then
39 echo Deleting ${gdbtk_files}
40 fi
41else
42 keep_these_too="${keep_these_too} ${gdbtk_files}"
43 if [ -n "${verbose}" ] ; then
44 echo Keeping ${gdbtk_files}
45 fi
5db7ecb7 46fi
7d0eab7b 47
77cbdd35
DE
48# This is for newlib net releases.
49# We don't check for duplicates of COPYING.NEWLIB appearing because it's not
50# intended that keep-cygnus and keep-newlib be used together.
51newlib_files="COPYING.NEWLIB"
52
53if ( echo $* | grep keep\-newlib > /dev/null) ; then
54 keep_these_too="${keep_these_too} ${newlib_files}"
55else
56 lose_these_too="${lose_these_too} ${newlib_files}"
57fi
58
e03b0bca
KR
59# This top-level directory is special. We often check out only subsets
60# of this directory, and complaining about directories or files we didn't
61# check out just gets obnoxious.
62
63list="${keep_these_too}"
64keep_these_too=
65
66for file in $list ; do
67 if [ -r $file ] || [ -d $file ] ; then
68 keep_these_too="${keep_these_too} $file"
69 fi
70done
71
72list="${lose_these_too}"
73lose_these_too=
74
75for file in $list ; do
76 if [ -r $file ] || [ -d $file ] ; then
77 lose_these_too="${lose_these_too} $file"
78 fi
79done
80
a93b3c77 81# All files listed between the "Things-to-keep:" line and the
43e36dd2 82# "Do-last:" line will be kept. All other files will be removed.
a93b3c77
RP
83# Directories listed in this section will have their own Sanitize
84# called. Directories not listed will be removed in their entirety
85# with rm -rf.
86
87Things-to-keep:
88
6e37b215
PB
89COPYING
90COPYING.LIB
57d32184 91ChangeLog
a93b3c77 92Makefile.in
965a9f14 93README
a93b3c77 94config
5cc24596 95config.guess
db2de419 96config.sub
a93b3c77
RP
97configure
98configure.in
701df845 99etc
3be6e47e 100# These will only show up if they checked out gas-extra-stuff.
16004cc8
KR
101configure.bat
102makeall.bat
7f390875
SS
103mpw-README
104mpw-configure
105mpw-config.in
106mpw-build.in
a93b3c77 107
87756e15
RP
108Things-to-lose:
109
43e36dd2
RP
110# The lines between the "Do-last:" line and the end of the file
111# are executed as a /bin/sh shell script after everything else is
112# done.
113
a93b3c77
RP
114Do-last:
115
bf150019
DE
116# Don't try to clean directories here, as the 'mv' command will fail.
117# Also, grep fails on NFS mounted directories.
118
7b85349f
RP
119if ( echo $* | egrep verbose > /dev/null ) ; then
120 verbose=true
121else
122 verbose=
123fi
124
eecef7ef
FF
125# Remove "sanitize-Sanitize" lines.
126if [ -n "${verbose}" ] ; then
127 echo Cleaning unconditional sanitizations out of Makefile.in...
128fi
129cp Makefile.in new
130sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
131if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
132 mv Makefile.in .Recover
133fi
134mv new Makefile.in
135
7b85349f
RP
136if [ -n "${verbose}" ] ; then
137 echo Thawing away the \"chill\"...
138fi
5d4ec851 139
5d4ec851
FF
140if ( echo $* | grep keep\-chill > /dev/null ) ; then
141 for i in * ; do
142 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
143 if [ -n "${verbose}" ] ; then
144 echo Keeping chill stuff in $i
145 fi
5d4ec851
FF
146 fi
147 done
148else
149 for i in * ; do
150 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
151 if [ -n "${verbose}" ] ; then
152 echo Thawing the \"chill\" out of $i...
153 fi
5d4ec851
FF
154 cp $i new
155 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
156 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
7b85349f
RP
157 if [ -n "${verbose}" ] ; then
158 echo Caching $i in .Recover...
159 fi
5d4ec851
FF
160 mv $i .Recover
161 fi
162 mv new $i
163 fi
164 done
5d4ec851
FF
165fi
166
86118528
KR
167if [ -n "${verbose}" ] ; then
168 echo Processing \"arc\"...
169fi
170
bf150019
DE
171arc_files="config.sub configure.in"
172
86118528 173if ( echo $* | grep keep\-arc > /dev/null ) ; then
bf150019 174 for i in $arc_files ; do
86118528
KR
175 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
176 if [ -n "${verbose}" ] ; then
177 echo Keeping arc stuff in $i
178 fi
179 fi
180 done
181else
182 for i in * ; do
183 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
184 if [ -n "${verbose}" ] ; then
185 echo Removing traces of \"arc\" from $i...
186 fi
187 cp $i new
188 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
bf150019
DE
189 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
190 if [ -n "${verbose}" ] ; then
191 echo Caching $i in .Recover...
192 fi
193 mv $i .Recover
194 fi
195 mv new $i
196 fi
197 done
198fi
199
200psion_files="config.sub configure.in"
201
202if ( echo $* | grep keep\-psion > /dev/null ) ; then
203 for i in $psion_files; do
204 if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then
205 if [ -n "${verbose}" ] ; then
206 echo Keeping psion stuff in $i
207 fi
208 fi
209 done
210else
211 for i in * ; do
212 if test ! -d $i && (grep sanitize-psion $i > /dev/null) ; then
213 if [ -n "${verbose}" ] ; then
214 echo Removing traces of \"psion\" from $i...
215 fi
216 cp $i new
217 sed '/start\-sanitize\-psion/,/end-\sanitize\-psion/d' < $i > new
86118528
KR
218 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
219 if [ -n "${verbose}" ] ; then
220 echo Caching $i in .Recover...
221 fi
222 mv $i .Recover
223 fi
224 mv new $i
225 fi
226 done
227fi
228
03c4ce2f 229rce_files="config.sub"
5c680afd 230
03c4ce2f
MT
231if ( echo $* | grep keep\-rce > /dev/null ) ; then
232 for i in $rce_files ; do
233 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
5c680afd 234 if [ -n "${verbose}" ] ; then
03c4ce2f 235 echo Keeping rce stuff in $i
5c680afd
MT
236 fi
237 fi
238 done
239else
03c4ce2f
MT
240 for i in $rce_files ; do
241 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
5c680afd 242 if [ -n "${verbose}" ] ; then
03c4ce2f 243 echo Removing traces of \"rce\" from $i...
5c680afd
MT
244 fi
245 cp $i new
03c4ce2f 246 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
5c680afd
MT
247 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
248 if [ -n "${verbose}" ] ; then
249 echo Caching $i in .Recover...
250 fi
251 mv $i .Recover
252 fi
253 mv new $i
254 fi
255 done
256fi
257
e11b54be
PB
258for i in * ; do
259 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
7b85349f 260 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
e11b54be
PB
261 fi
262done
57d32184
RP
263
264# eof
This page took 0.142296 seconds and 4 git commands to generate.