1 # .Sanitize for devo/ld
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.
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
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.
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
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
100 v850_files="ChangeLog configure.tgt Makefile.am Makefile.in"
101 if ( 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
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...
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...
128 tx49_files="ChangeLog configure.tgt"
129 if ( 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
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...
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...
156 r5900_files="ChangeLog configure.tgt Makefile.in Makefile.am"
157 if ( 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
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...
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...
184 vr4320_files="ChangeLog configure.tgt"
185 if ( 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
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...
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...
212 tic80_files="ChangeLog configure.tgt Makefile.am Makefile.in"
213 if ( 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
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...
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...
240 d30v_files="ChangeLog configure.tgt Makefile.am Makefile.in"
241 if ( 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
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...
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...
268 sky_files="ChangeLog configure.tgt"
269 if ( 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
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...
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...
297 if test ! -d $i && (grep sanitize $i > /dev/null) ; then
298 echo '***' Some mentions of Sanitize are still left in $i! 1>&2
302 # This must come after all other sanitizations. Re-sanitize the .pot
304 if [ -n "${verbose}" ]; then
305 echo Re-computing files for gettext ...
308 if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
309 if [ -n "${verbose}" ]; then
310 echo Caching po/POTFILES.in in .Recover...
312 mv po/POTFILES.in po/.Recover
314 find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
316 if [ -n "${safe}" -a ! -f po/.Recover/ld.pot ]; then
317 if [ -n "${verbose}" ]; then
318 echo Caching po/ld.pot in .Recover...
320 mv po/ld.pot po/.Recover
322 # If this fails, Sanitization must fail.
323 xgettext -c -k_ -kN_ -f po/POTFILES.in -o po/ld.pot || exit 1