* gdbtk.tcl (build_framework): Fix bug with setting window titles.
[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
24 tk test-build.mk texinfo tgas utils uudecode wdiff xiberty"
e03b0bca 25
1ed0529e 26cygnus_files="release release-info build-all.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
eccc57e5 34mpw_files="mpw-README mpw-configure mpw-config.in mpw-build.in ChangeLog.mpw"
96c805d8 35
5db7ecb7 36if ( echo $* | grep keep\-mpw > /dev/null) ; then
96c805d8 37 keep_these_too="${keep_these_too} ${mpw_files}"
5db7ecb7 38else
96c805d8 39 lose_these_too="${lose_these_too} ${mpw_files}"
5db7ecb7 40fi
7d0eab7b 41
e03b0bca
KR
42# This top-level directory is special. We often check out only subsets
43# of this directory, and complaining about directories or files we didn't
44# check out just gets obnoxious.
45
46list="${keep_these_too}"
47keep_these_too=
48
49for file in $list ; do
50 if [ -r $file ] || [ -d $file ] ; then
51 keep_these_too="${keep_these_too} $file"
52 fi
53done
54
55list="${lose_these_too}"
56lose_these_too=
57
58for file in $list ; do
59 if [ -r $file ] || [ -d $file ] ; then
60 lose_these_too="${lose_these_too} $file"
61 fi
62done
63
a93b3c77 64# All files listed between the "Things-to-keep:" line and the
43e36dd2 65# "Do-last:" line will be kept. All other files will be removed.
a93b3c77
RP
66# Directories listed in this section will have their own Sanitize
67# called. Directories not listed will be removed in their entirety
68# with rm -rf.
69
70Things-to-keep:
71
6e37b215
PB
72COPYING
73COPYING.LIB
57d32184 74ChangeLog
a93b3c77 75Makefile.in
965a9f14 76README
a93b3c77 77config
5cc24596 78config.guess
db2de419 79config.sub
a93b3c77
RP
80configure
81configure.in
701df845 82etc
16004cc8
KR
83configure.bat
84makeall.bat
a93b3c77 85
87756e15
RP
86Things-to-lose:
87
43e36dd2
RP
88# The lines between the "Do-last:" line and the end of the file
89# are executed as a /bin/sh shell script after everything else is
90# done.
91
a93b3c77
RP
92Do-last:
93
7b85349f
RP
94if ( echo $* | egrep verbose > /dev/null ) ; then
95 verbose=true
96else
97 verbose=
98fi
99
eecef7ef
FF
100# Remove "sanitize-Sanitize" lines.
101if [ -n "${verbose}" ] ; then
102 echo Cleaning unconditional sanitizations out of Makefile.in...
103fi
104cp Makefile.in new
105sed '/start\-sanitize\-Sanitize/,/end-\sanitize\-Sanitize/d' < Makefile.in > new
106if [ -n "${safe}" -a ! -f .Recover/Makefile.in ] ; then
107 mv Makefile.in .Recover
108fi
109mv new Makefile.in
110
7b85349f
RP
111if [ -n "${verbose}" ] ; then
112 echo Thawing away the \"chill\"...
113fi
5d4ec851
FF
114
115# Don't try to clean directories here, as the 'mv' command will fail.
116# Also, grep fails on NFS mounted directories.
117if ( echo $* | grep keep\-chill > /dev/null ) ; then
118 for i in * ; do
119 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
120 if [ -n "${verbose}" ] ; then
121 echo Keeping chill stuff in $i
122 fi
5d4ec851
FF
123 fi
124 done
125else
126 for i in * ; do
127 if test ! -d $i && (grep sanitize-chill $i > /dev/null) ; then
7b85349f
RP
128 if [ -n "${verbose}" ] ; then
129 echo Thawing the \"chill\" out of $i...
130 fi
5d4ec851
FF
131 cp $i new
132 sed '/start\-sanitize\-chill/,/end-\sanitize\-chill/d' < $i > new
133 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
7b85349f
RP
134 if [ -n "${verbose}" ] ; then
135 echo Caching $i in .Recover...
136 fi
5d4ec851
FF
137 mv $i .Recover
138 fi
139 mv new $i
140 fi
141 done
5d4ec851
FF
142fi
143
5db7ecb7
SS
144if [ -n "${verbose}" ] ; then
145 echo Removing traces of \"mpw\"...
146fi
147
148# Don't try to clean directories here, as the 'mv' command will fail.
149# Also, grep fails on NFS mounted directories.
150if ( echo $* | grep keep\-mpw > /dev/null ) ; then
151 for i in * ; do
152 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
153 if [ -n "${verbose}" ] ; then
154 echo Keeping mpw stuff in $i
155 fi
156 fi
157 done
158else
159 for i in * ; do
160 if test ! -d $i && (grep sanitize-mpw $i > /dev/null) ; then
161 if [ -n "${verbose}" ] ; then
162 echo Removing traces of \"mpw\" from $i...
163 fi
164 cp $i new
165 sed '/start\-sanitize\-mpw/,/end-\sanitize\-mpw/d' < $i > new
166 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
167 if [ -n "${verbose}" ] ; then
168 echo Caching $i in .Recover...
169 fi
170 mv $i .Recover
171 fi
172 mv new $i
173 fi
174 done
175fi
176
86118528
KR
177if [ -n "${verbose}" ] ; then
178 echo Processing \"arc\"...
179fi
180
181# Don't try to clean directories here, as the 'mv' command will fail.
182# Also, grep fails on NFS mounted directories.
183if ( echo $* | grep keep\-arc > /dev/null ) ; then
184 for i in * ; do
185 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
186 if [ -n "${verbose}" ] ; then
187 echo Keeping arc stuff in $i
188 fi
189 fi
190 done
191else
192 for i in * ; do
193 if test ! -d $i && (grep sanitize-arc $i > /dev/null) ; then
194 if [ -n "${verbose}" ] ; then
195 echo Removing traces of \"arc\" from $i...
196 fi
197 cp $i new
198 sed '/start\-sanitize\-arc/,/end-\sanitize\-arc/d' < $i > new
199 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
200 if [ -n "${verbose}" ] ; then
201 echo Caching $i in .Recover...
202 fi
203 mv $i .Recover
204 fi
205 mv new $i
206 fi
207 done
208fi
209
03c4ce2f 210rce_files="config.sub"
5c680afd 211
03c4ce2f
MT
212if ( echo $* | grep keep\-rce > /dev/null ) ; then
213 for i in $rce_files ; do
214 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
5c680afd 215 if [ -n "${verbose}" ] ; then
03c4ce2f 216 echo Keeping rce stuff in $i
5c680afd
MT
217 fi
218 fi
219 done
220else
03c4ce2f
MT
221 for i in $rce_files ; do
222 if test ! -d $i && (grep sanitize-rce $i > /dev/null) ; then
5c680afd 223 if [ -n "${verbose}" ] ; then
03c4ce2f 224 echo Removing traces of \"rce\" from $i...
5c680afd
MT
225 fi
226 cp $i new
03c4ce2f 227 sed '/start\-sanitize\-rce/,/end-\sanitize\-rce/d' < $i > new
5c680afd
MT
228 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
229 if [ -n "${verbose}" ] ; then
230 echo Caching $i in .Recover...
231 fi
232 mv $i .Recover
233 fi
234 mv new $i
235 fi
236 done
237fi
238
e11b54be
PB
239for i in * ; do
240 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
7b85349f 241 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
e11b54be
PB
242 fi
243done
57d32184
RP
244
245# eof
This page took 0.12495 seconds and 4 git commands to generate.