If xgettext fails, make Sanitize fail
[deliverable/binutils-gdb.git] / ld / .Sanitize
... / ...
CommitLineData
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
16Do-first:
17
18
19# All files listed between the "Things-to-keep:" line and the
20# "Do-last:" line will be kept. All other files will be removed.
21# Directories listed in this section will have their own Sanitize
22# called. Directories not listed will be removed in their entirety
23# with rm -rf.
24
25Things-to-keep:
26
27ChangeLog
28Makefile.am
29Makefile.in
30NEWS
31README
32TODO
33acconfig.h
34acinclude.m4
35aclocal.m4
36config.in
37configure
38configure.bat
39configure.host
40configure.in
41configure.tgt
42dep-in.sed
43emulparams
44emultempl
45gen-doc.texi
46genscripts.sh
47h8-doc.texi
48ld.1
49ld.h
50ld.texinfo
51ldcref.c
52ldctor.c
53ldctor.h
54ldemul.c
55ldemul.h
56ldexp.c
57ldexp.h
58ldfile.c
59ldfile.h
60ldgram.y
61ldint.texinfo
62ldlang.c
63ldlang.h
64ldlex.h
65ldlex.l
66ldmain.c
67ldmain.h
68ldmisc.c
69ldmisc.h
70ldver.c
71ldver.h
72ldwrite.c
73ldwrite.h
74lexsup.c
75mac-ld.r
76mpw-config.in
77mpw-elfmips.c
78mpw-eppcmac.c
79mpw-esh.c
80mpw-idtmips.c
81mpw-make.sed
82mri.c
83mri.h
84po
85scripttempl
86stamp-h.in
87sysdep.h
88testsuite
89
90Things-to-lose:
91
92
93
94# The lines between the "Do-last:" line and the end of the file
95# are executed as a /bin/sh shell script after everything else is
96# done.
97
98Do-last:
99
100v850_files="ChangeLog configure.tgt Makefile.am Makefile.in"
101if ( echo $* | grep keep\-v850e > /dev/null ) ; then
102 for i in $v850_files ; do
103 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
104 if [ -n "${verbose}" ] ; then
105 echo Keeping v850e stuff in $i
106 fi
107 fi
108 done
109else
110 for i in $v850_files ; do
111 if test ! -d $i && (grep sanitize-v850e $i > /dev/null) ; then
112 if [ -n "${verbose}" ] ; then
113 echo Removing traces of \"v850e\" from $i...
114 fi
115 cp $i new
116 sed '/start\-sanitize\-v850e/,/end-\sanitize\-v850e/d' < $i > new
117 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
118 if [ -n "${verbose}" ] ; then
119 echo Caching $i in .Recover...
120 fi
121 mv $i .Recover
122 fi
123 mv new $i
124 fi
125 done
126fi
127
128tx49_files="ChangeLog configure.tgt"
129if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
130 for i in $tx49_files ; do
131 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
132 if [ -n "${verbose}" ] ; then
133 echo Keeping tx49 stuff in $i
134 fi
135 fi
136 done
137else
138 for i in $tx49_files ; do
139 if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
140 if [ -n "${verbose}" ] ; then
141 echo Removing traces of \"tx49\" from $i...
142 fi
143 cp $i new
144 sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
145 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
146 if [ -n "${verbose}" ] ; then
147 echo Caching $i in .Recover...
148 fi
149 mv $i .Recover
150 fi
151 mv new $i
152 fi
153 done
154fi
155
156r5900_files="ChangeLog configure.tgt Makefile.in Makefile.am"
157if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
158 for i in $r5900_files ; do
159 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
160 if [ -n "${verbose}" ] ; then
161 echo Keeping r5900 stuff in $i
162 fi
163 fi
164 done
165else
166 for i in $r5900_files ; do
167 if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
168 if [ -n "${verbose}" ] ; then
169 echo Removing traces of \"r5900\" from $i...
170 fi
171 cp $i new
172 sed '/start\-sanitize\-r5900/,/end-\sanitize\-r5900/d' < $i > new
173 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
174 if [ -n "${verbose}" ] ; then
175 echo Caching $i in .Recover...
176 fi
177 mv $i .Recover
178 fi
179 mv new $i
180 fi
181 done
182fi
183
184vr4320_files="ChangeLog configure.tgt"
185if ( echo $* | grep keep\-vr4320 > /dev/null ) ; then
186 for i in $vr4320_files ; do
187 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
188 if [ -n "${verbose}" ] ; then
189 echo Keeping vr4320 stuff in $i
190 fi
191 fi
192 done
193else
194 for i in $vr4320_files ; do
195 if test ! -d $i && (grep sanitize-vr4320 $i > /dev/null) ; then
196 if [ -n "${verbose}" ] ; then
197 echo Removing traces of \"vr4320\" from $i...
198 fi
199 cp $i new
200 sed '/start\-sanitize\-vr4320/,/end-\sanitize\-vr4320/d' < $i > new
201 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
202 if [ -n "${verbose}" ] ; then
203 echo Caching $i in .Recover...
204 fi
205 mv $i .Recover
206 fi
207 mv new $i
208 fi
209 done
210fi
211
212tic80_files="ChangeLog configure.tgt Makefile.am Makefile.in"
213if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
214 for i in $tic80_files ; do
215 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
216 if [ -n "${verbose}" ] ; then
217 echo Keeping tic80 stuff in $i
218 fi
219 fi
220 done
221else
222 for i in $tic80_files ; do
223 if test ! -d $i && (grep sanitize-tic80 $i > /dev/null) ; then
224 if [ -n "${verbose}" ] ; then
225 echo Removing traces of \"tic80\" from $i...
226 fi
227 cp $i new
228 sed '/start\-sanitize\-tic80/,/end-\sanitize\-tic80/d' < $i > new
229 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
230 if [ -n "${verbose}" ] ; then
231 echo Caching $i in .Recover...
232 fi
233 mv $i .Recover
234 fi
235 mv new $i
236 fi
237 done
238fi
239
240d30v_files="ChangeLog configure.tgt Makefile.am Makefile.in"
241if ( echo $* | grep keep\-d30v > /dev/null ) ; then
242 for i in $d30v_files ; do
243 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
244 if [ -n "${verbose}" ] ; then
245 echo Keeping d30v stuff in $i
246 fi
247 fi
248 done
249else
250 for i in $d30v_files ; do
251 if test ! -d $i && (grep sanitize-d30v $i > /dev/null) ; then
252 if [ -n "${verbose}" ] ; then
253 echo Removing traces of \"d30v\" from $i...
254 fi
255 cp $i new
256 sed '/start\-sanitize\-d30v/,/end-\sanitize\-d30v/d' < $i > new
257 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
258 if [ -n "${verbose}" ] ; then
259 echo Caching $i in .Recover...
260 fi
261 mv $i .Recover
262 fi
263 mv new $i
264 fi
265 done
266fi
267
268sky_files="ChangeLog configure.tgt"
269if ( echo $* | grep keep\-sky > /dev/null ) ; then
270 for i in $sky_files ; do
271 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
272 if [ -n "${verbose}" ] ; then
273 echo Keeping sky stuff in $i
274 fi
275 fi
276 done
277else
278 for i in $sky_files ; do
279 if test ! -d $i && (grep sanitize-sky $i > /dev/null) ; then
280 if [ -n "${verbose}" ] ; then
281 echo Removing traces of \"sky\" from $i...
282 fi
283 cp $i new
284 sed '/start\-sanitize\-sky/,/end-\sanitize\-sky/d' < $i > new
285 if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
286 if [ -n "${verbose}" ] ; then
287 echo Caching $i in .Recover...
288 fi
289 mv $i .Recover
290 fi
291 mv new $i
292 fi
293 done
294fi
295
296for i in * ; do
297 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
298 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
299 fi
300done
301
302# This must come after all other sanitizations. Re-sanitize the .pot
303# file.
304if [ -n "${verbose}" ]; then
305 echo Re-computing files for gettext ...
306fi
307
308if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
309 if [ -n "${verbose}" ]; then
310 echo Caching po/POTFILES.in in .Recover...
311 fi
312 mv po/POTFILES.in po/.Recover
313fi
314find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
315
316if [ -n "${safe}" -a ! -f po/.Recover/ld.pot ]; then
317 if [ -n "${verbose}" ]; then
318 echo Caching po/ld.pot in .Recover...
319 fi
320 mv po/ld.pot po/.Recover
321fi
322# If this fails, Sanitization must fail.
323xgettext `cat po/POTFILES.in` -o po/ld.pot || exit 1
324# eof
This page took 0.024047 seconds and 4 git commands to generate.