fix armelf sanitization and checks for mentions of sanitized files
[deliverable/binutils-gdb.git] / ld / .Sanitize
1 # .Sanitize for devo/ld
2
3 # Each directory to survive its 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
14 # done in this directory.
15
16 Do-first:
17
18 # Remember the current lists of files in the subdirectories from which
19 # we might remove files.
20 if test -d emulparams; then
21 ld_emulparams_files=`cd emulparams; echo *`
22 else
23 ld_emulparams_files=
24 fi
25 if test -d emultempl; then
26 ld_emultempl_files=`cd emultempl; echo *`
27 else
28 ld_emultempl_files=
29 fi
30 if test -d scripttempl; then
31 ld_scripttempl_files=`cd scripttempl; echo *`
32 else
33 ld_scripttempl_files=
34 fi
35
36 # All files listed between the "Things-to-keep:" line and the
37 # "Do-last:" line will be kept. All other files will be removed.
38 # Directories listed in this section will have their own Sanitize
39 # called. Directories not listed will be removed in their entirety
40 # with rm -rf.
41
42 Things-to-keep:
43
44 ChangeLog
45 Makefile.am
46 Makefile.in
47 NEWS
48 README
49 TODO
50 acconfig.h
51 acinclude.m4
52 aclocal.m4
53 config.in
54 configure
55 configure.bat
56 configure.host
57 configure.in
58 configure.tgt
59 dep-in.sed
60 emulparams
61 emultempl
62 gen-doc.texi
63 genscripts.sh
64 h8-doc.texi
65 ld.1
66 ld.h
67 ld.texinfo
68 ldcref.c
69 ldctor.c
70 ldctor.h
71 ldemul.c
72 ldemul.h
73 ldexp.c
74 ldexp.h
75 ldfile.c
76 ldfile.h
77 ldgram.y
78 ldint.texinfo
79 ldlang.c
80 ldlang.h
81 ldlex.h
82 ldlex.l
83 ldmain.c
84 ldmain.h
85 ldmisc.c
86 ldmisc.h
87 ldver.c
88 ldver.h
89 ldwrite.c
90 ldwrite.h
91 lexsup.c
92 mac-ld.r
93 mpw-config.in
94 mpw-elfmips.c
95 mpw-eppcmac.c
96 mpw-esh.c
97 mpw-idtmips.c
98 mpw-make.sed
99 mri.c
100 mri.h
101 po
102 scripttempl
103 stamp-h.in
104 sysdep.h
105 testsuite
106
107 Things-to-lose:
108
109
110
111 # The lines between the "Do-last:" line and the end of the file
112 # are executed as a /bin/sh shell script after everything else is
113 # done.
114
115 Do-last:
116
117 v850_files="ChangeLog configure.tgt Makefile.am Makefile.in"
118 if ( echo $* | grep keep\-v850e > /dev/null ) ; then
119 for i in $v850_files ; do
120 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
121 if [ -n "${verbose}" ] ; then
122 echo Keeping v850e stuff in $i
123 fi
124 fi
125 done
126 else
127 for i in $v850_files ; do
128 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
129 if [ -n "${verbose}" ] ; then
130 echo Removing traces of \"v850e\" from $i...
131 fi
132 cp $i new
133 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
134 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
135 if [ -n "${verbose}" ] ; then
136 echo Caching $i in .Recover...
137 fi
138 mv $i .Recover
139 fi
140 mv new $i
141 fi
142 done
143 fi
144
145 tx49_files="ChangeLog configure.tgt"
146 if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
147 for i in $tx49_files ; do
148 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
149 if [ -n "${verbose}" ] ; then
150 echo Keeping tx49 stuff in $i
151 fi
152 fi
153 done
154 else
155 for i in $tx49_files ; do
156 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
157 if [ -n "${verbose}" ] ; then
158 echo Removing traces of \"tx49\" from $i...
159 fi
160 cp $i new
161 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
162 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
163 if [ -n "${verbose}" ] ; then
164 echo Caching $i in .Recover...
165 fi
166 mv $i .Recover
167 fi
168 mv new $i
169 fi
170 done
171 fi
172
173 r5900_files="ChangeLog configure.tgt Makefile.in Makefile.am"
174 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
175 for i in $r5900_files ; do
176 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
177 if [ -n "${verbose}" ] ; then
178 echo Keeping r5900 stuff in $i
179 fi
180 fi
181 done
182 else
183 for i in $r5900_files ; do
184 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
185 if [ -n "${verbose}" ] ; then
186 echo Removing traces of \"r5900\" from $i...
187 fi
188 cp $i new
189 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/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 vr4320_files="ChangeLog configure.tgt"
202 if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
203 for i in $vr4320_files ; do
204 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
205 if [ -n "${verbose}" ] ; then
206 echo Keeping vr4320 stuff in $i
207 fi
208 fi
209 done
210 else
211 for i in $vr4320_files ; do
212 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
213 if [ -n "${verbose}" ] ; then
214 echo Removing traces of \"vr4320\" from $i...
215 fi
216 cp $i new
217 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
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
227 fi
228
229 tic80_files="ChangeLog configure.tgt Makefile.am Makefile.in"
230 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
231 for i in $tic80_files ; do
232 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
233 if [ -n "${verbose}" ] ; then
234 echo Keeping tic80 stuff in $i
235 fi
236 fi
237 done
238 else
239 for i in $tic80_files ; do
240 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
241 if [ -n "${verbose}" ] ; then
242 echo Removing traces of \"tic80\" from $i...
243 fi
244 cp $i new
245 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
246 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
247 if [ -n "${verbose}" ] ; then
248 echo Caching $i in .Recover...
249 fi
250 mv $i .Recover
251 fi
252 mv new $i
253 fi
254 done
255 fi
256
257 sky_files="ChangeLog configure.tgt"
258 if ( echo $* | grep keep\-sky > /dev/null ) ; then
259 for i in $sky_files ; do
260 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
261 if [ -n "${verbose}" ] ; then
262 echo Keeping sky stuff in $i
263 fi
264 fi
265 done
266 else
267 for i in $sky_files ; do
268 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
269 if [ -n "${verbose}" ] ; then
270 echo Removing traces of \"sky\" from $i...
271 fi
272 cp $i new
273 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
274 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
275 if [ -n "${verbose}" ] ; then
276 echo Caching $i in .Recover...
277 fi
278 mv $i .Recover
279 fi
280 mv new $i
281 fi
282 done
283 fi
284
285 beos_files="ChangeLog Makefile.am Makefile.in configure.tgt"
286 if ( echo $* | grep keep\-beos > /dev/null ) ; then
287 for i in $beos_files ; do
288 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
289 if [ -n "${verbose}" ] ; then
290 echo Keeping beos stuff in $i
291 fi
292 fi
293 done
294 else
295 for i in $beos_files ; do
296 if test ! -d $i && (grep sanitize-beos $i > /dev/null) ; then
297 if [ -n "${verbose}" ] ; then
298 echo Removing traces of \"beos\" from $i...
299 fi
300 cp $i new
301 sed '/start\-sanitize\-beos/,/end-\sanitize\-beos/d' < $i > new
302 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
303 if [ -n "${verbose}" ] ; then
304 echo Caching $i in .Recover...
305 fi
306 mv $i .Recover
307 fi
308 mv new $i
309 fi
310 done
311 fi
312
313 armelf_files="ChangeLog configure.tgt Makefile.am Makefile.in"
314 if ( echo $* | grep keep\-armelf > /dev/null ) ; then
315 for i in $armelf_files ; do
316 if test ! -d $i && (grep sanitize-armelf $i > /dev/null) ; then
317 if [ -n "${verbose}" ] ; then
318 echo Keeping armelf stuff in $i
319 fi
320 fi
321 done
322 else
323 for i in $armelf_files ; do
324 if test ! -d $i && (grep sanitize-armelf $i > /dev/null) ; then
325 if [ -n "${verbose}" ] ; then
326 echo Removing traces of \"armelf\" from $i...
327 fi
328 cp $i new
329 sed '/start\-sanitize\-armelf/,/end-\sanitize\-armelf/d' < $i > new
330 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
331 if [ -n "${verbose}" ] ; then
332 echo Caching $i in .Recover...
333 fi
334 mv $i .Recover
335 fi
336 mv new $i
337 fi
338 done
339 fi
340
341 for i in * ; do
342 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
343 echo '***' Some mentions of Sanitize are still left in ld/$i! 1>&2
344 fi
345 done
346
347 for lost in .. $ld_emulparams_files; do
348 if test $lost != .. && test $lost != CVS; then
349 if test -f emulparams/$lost; then
350 :
351 else
352 lost2=`echo $lost | sed -e 's/.sh$//'`
353 for i in Makefile.am Makefile.in configure.host configure.tgt configure.in configure; do
354 if fgrep $lost2 $i >/dev/null 2>&1; then
355 echo '***' File ld/emulparams/$lost was sanitized out but is still mentioned in ld/$i 1>&2
356 fi
357 done
358 fi
359 fi
360 done
361
362 for lost in .. $ld_emultempl_files; do
363 if test $lost != .. && test $lost != CVS; then
364 if test -f emultempl/$lost; then
365 :
366 else
367 lost2=`echo $lost | sed -e 's/.em$//'`
368 for i in Makefile.am Makefile.in configure.host configure.tgt configure.in configure; do
369 if fgrep $lost2 $i >/dev/null 2>&1; then
370 # There is a valid mention of beos in configure.tgt
371 if test $lost2 != "beos" || test $i != configure.tgt; then
372 echo '***' File ld/emultempl/$lost was sanitized out but is still mentioned in ld/$i 1>&2
373 fi
374 fi
375 done
376 if test -d emulparams; then
377 for i in emulparams/*; do
378 if fgrep $lost2 $i >/dev/null 2>&1; then
379 echo '***' File ld/emultempl/$lost was sanitized out but is still mentioned in ld/$i 1>&2
380 fi
381 done
382 fi
383 fi
384 fi
385 done
386
387 for lost in .. $ld_scripttempl_files; do
388 if test $lost != .. && test $lost != CVS; then
389 if test -f scripttempl/$lost; then
390 :
391 else
392 lost2=`echo $lost | sed -e 's/.sc$//'`
393 for i in Makefile.am Makefile.in configure.host configure.tgt configure.in configure; do
394 if fgrep $lost2 $i >/dev/null 2>&1; then
395 echo '***' File ld/scripttempl/$lost was sanitized out but is still mentioned in ld/$i 1>&2
396 fi
397 done
398 if test -d emulparams; then
399 for i in emulparams/*; do
400 if fgrep $lost2 $i >/dev/null 2>&1; then
401 echo '***' File ld/scripttempl/$lost was sanitized out but is still mentioned in ld/$i 1>&2
402 fi
403 done
404 fi
405 fi
406 fi
407 done
408
409 # This must come after all other sanitizations. Re-sanitize the .pot
410 # file.
411 if [ -n "${verbose}" ]; then
412 echo Re-computing files for gettext ...
413 fi
414
415 if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
416 if [ -n "${verbose}" ]; then
417 echo Caching po/POTFILES.in in .Recover...
418 fi
419 mv po/POTFILES.in po/.Recover
420 fi
421 find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
422
423 if [ -n "${safe}" -a ! -f po/.Recover/ld.pot ]; then
424 if [ -n "${verbose}" ]; then
425 echo Caching po/ld.pot in .Recover...
426 fi
427 mv po/ld.pot po/.Recover
428 fi
429 # If this fails, Sanitization must fail.
430 xgettext -c -C -k_ -kN_ -f po/POTFILES.in -o po/ld.pot || exit 1
431 # eof
This page took 0.039707 seconds and 5 git commands to generate.