1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
|
Reorganize the alphabets/LANG/ directories, rewriting the
sub-Makefile alphabets/LANG/Makefile.am as Makefile.am
fragment incuded by alphabets/Makefile.am.
Note: these include's are resolved by `automake'.
The idea is to put everything specific for a language into
the Makefile.am fragment for that language.
The fragments are (re-)generated by running 'sh mk-lang.sh'
(in make-rules/alphabets).
========
Drop unused files (from TL2008 and more).
diff -ur -x Makefile.in -x autom4te.cache xindy-2.4.orig/make-rules/alphabets/Makefile.am.not-yet xindy-2.4/make-rules/alphabets/Makefile.am.not-yet
--- xindy-2.4.orig/make-rules/alphabets/Makefile.am.not-yet 1970-01-01 01:00:00.000000000 +0100
+++ xindy-2.4/make-rules/alphabets/Makefile.am.not-yet 2010-01-13 13:01:37.000000000 +0100
@@ -0,0 +1,310 @@
+## Use `autoreconf' in top-level directory to recreate all
+## autoconf/automake files.
+## Or, call `automake Makefile' to create only Makefile.in.
+
+## Copyright (C) 2004-2005 by Gour.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2 of the
+## License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program in the file COPYING; if not, write to the
+## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301 USA.
+
+langdir = $(pkglibdir)/modules/lang
+
+nobase_nodist_lang_DATA =
+dist_noinst_DATA =
+
+DOCS_CP1250 =
+DOCS_CP1252 =
+DOCS_CP850 =
+DOCS_LATIN1 =
+DOCS_LATIN2 =
+DOCS_LATIN3 =
+DOCS_LATIN4 =
+DOCS_LATIN5 =
+DOCS_LATIN9 =
+
+DOCS_CYR_1251 =
+DOCS_CYR_ISO88595 =
+DOCS_CYR_ISOIR111 =
+DOCS_CYR_KOI8_R =
+DOCS_CYR_KOI8_U =
+
+DOCS_ISO88597 =
+DOCS_ISO88598 =
+
+DOCS_UTF8_LAT =
+DOCS_UTF8_CYR =
+DOCS_UTF8_OTHER =
+
+EXTRA_DIST = mk-lang.sh lang.defs
+CLEANFILES =
+
+subdirs =
+
+## Include all Makefile fragments.
+include albanian/Makefile.am
+include belarusian/Makefile.am
+include bulgarian/Makefile.am
+include croatian/Makefile.am
+include czech/Makefile.am
+include danish/Makefile.am
+include dutch/Makefile.am
+include english/Makefile.am
+include esperanto/Makefile.am
+include estonian/Makefile.am
+include finnish/Makefile.am
+include french/Makefile.am
+include general/Makefile.am
+include georgian/Makefile.am
+include german/Makefile.am
+include greek/Makefile.am
+include gypsy/Makefile.am
+include hausa/Makefile.am
+include hebrew/Makefile.am
+include hungarian/Makefile.am
+include icelandic/Makefile.am
+include italian/Makefile.am
+include klingon/Makefile.am
+include kurdish/Makefile.am
+include latin/Makefile.am
+include latvian/Makefile.am
+include lithuanian/Makefile.am
+include lower-sorbian/Makefile.am
+include macedonian/Makefile.am
+include mongolian/Makefile.am
+include norwegian/Makefile.am
+include polish/Makefile.am
+include portuguese/Makefile.am
+include romanian/Makefile.am
+include russian/Makefile.am
+include serbian/Makefile.am
+include slovak/Makefile.am
+include slovenian/Makefile.am
+include spanish/Makefile.am
+include swedish/Makefile.am
+include test1/Makefile.am
+include turkish/Makefile.am
+include ukrainian/Makefile.am
+include upper-sorbian/Makefile.am
+include vietnamese/Makefile.am
+
+## Make sure all language subdirectories exist.
+BUILT_SOURCES = subdirs
+subdirs:
+ @for d in $(subdirs); do $(MKDIR_P) $$d; done
+.PHONY: subdirs
+
+%utf8.pl : %utf8.pl.in
+ sed -e 's/@.{\([^}]*\)}/\1/g;' <$< >$@
+
+%latin1.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO8859-1 >$@
+
+%cp850.pl : %utf8.pl.in
+ sed -e 's/@.{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)CP850 >$@
+
+%latin2.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO8859-2 >$@
+
+%latin3.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO8859-3 >$@
+
+%latin4.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO8859-4 >$@
+
+%iso88595.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO-8859-5 >$@
+
+%iso88597.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO-8859-7 >$@
+
+%iso88598.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO-8859-8 >$@
+
+%latin5.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO-8859-9 >$@
+
+%latin9.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;s/@9{\([^}]*\)}/\1/g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO-8859-15 >$@
+
+%cp1250.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)CP1250 >$@
+
+%cp1251.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)CP1251 >$@
+
+%cp1252.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;s/@9{\([^}]*\)}/\1/g;' <$< | \
+ $(CONVERT_FROM_UTF8)CP1252 >$@
+
+%isoir111.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)ISO-IR-111 >$@
+
+%koi8-r.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)KOI8-R >$@
+
+%koi8-u.pl : %utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' <$< | \
+ $(CONVERT_FROM_UTF8)KOI8-U >$@
+
+# %tex.pl : %utf8.pl utf8-to-tex.sed
+# sed -f $(srcdir)/utf8-to-tex.sed <$< >$@
+
+
+
+%-lang.xdy : %-test.xdy
+ sed -n '1,10 p' <$< >$@
+
+# Running "$(PERL) -I$(srcdir) $< $*" creates %-test.xdy, %-doc.tex, %.raw,
+# and %.xdy; %-test.xdy is finished first. We must not run this command
+# several times simultaneously (for details see Automake manual 27.9).
+%-test.xdy : %.pl
+ $(PERL) -I$(srcdir) $< $*
+
+%-doc.tex %.xdy : %-test.xdy
+ @if test -f $@; then :; else \
+ trap 'rm -rf $*.lock $<' 1 2 13 15; \
+ if mkdir $*.lock 2>/dev/null; then \
+ rm -f $<; \
+ $(MAKE) $(AM_MAKEFLAGS) $<; \
+ result=$$?; rm -rf $*.lock; exit $$result; \
+ else \
+ while test -d $*.lock; do sleep 1; done; \
+ test -f $<; \
+ fi; \
+ fi
+
+SCRS = \
+ alphabets-doc.tex \
+ make-rules.pl \
+ utf8-to-tex.sed
+
+DOCS_CYR = \
+ $(DOCS_CYR_1251) \
+ $(DOCS_CYR_ISO88595) \
+ $(DOCS_CYR_ISOIR111) \
+ $(DOCS_CYR_KOI8_R) \
+ $(DOCS_CYR_KOI8_U)
+
+DOCS_CPS = \
+ $(DOCS_CP1250) \
+ $(DOCS_CP1252) \
+ $(DOCS_CP850)
+
+DOCS_LAT = \
+ $(DOCS_LATIN1) \
+ $(DOCS_LATIN2) \
+ $(DOCS_LATIN3) \
+ $(DOCS_LATIN4) \
+ $(DOCS_LATIN5) \
+ $(DOCS_LATIN9)
+
+DOCS_OTHER = \
+ $(DOCS_ISO88597) \
+ $(DOCS_ISO88598)
+
+DOCS_UTF8 = \
+ $(DOCS_UTF8_LAT) \
+ $(DOCS_UTF8_CYR) \
+ $(DOCS_UTF8_OTHER)
+
+DOCS = $(DOCS_CPS) $(DOCS_LAT) $(DOCS_CYR) $(DOCS_OTHER) $(DOCS_UTF8)
+
+
+alphabets-inc.tex : $(DOCS)
+ $(RM) $@
+ echo "\chapter{Latin scripts}" >>$@
+ echo "\ienc{cp1252}" >>$@
+ echo "\section{Codepage 1252}" >>$@
+ for i in $(DOCS_CP1252); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{latin1}" >>$@
+ echo "\section{Codepage latin1}" >>$@
+ for i in $(DOCS_LATIN1); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{cp850}" >>$@
+ echo "\section{Codepage 850}" >>$@
+ for i in $(DOCS_CP850); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{latin2}" >>$@
+ echo "\section{Codepage latin2}" >>$@
+ for i in $(DOCS_LATIN2); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{cp1250}" >>$@
+ echo "\section{Codepage 1250}" >>$@
+ for i in $(DOCS_CP1250); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{latin3}" >>$@
+ echo "\section{Codepage latin3}" >>$@
+ for i in $(DOCS_LATIN3); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{latin4}" >>$@
+ echo "\section{Codepage latin4}" >>$@
+ for i in $(DOCS_LATIN4); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{latin5}" >>$@
+ echo "\section{Codepage latin5}" >>$@
+ for i in $(DOCS_LATIN5); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{latin9}" >>$@
+ echo "\section{Codepage latin9}" >>$@
+ for i in $(DOCS_LATIN9); do echo "\input{$$i}" >>$@; done
+ echo "\ienc{cp1251}" >>$@
+ echo "\fenc{T2A}" >>$@
+ echo "\chapter{Cyrillic scripts}" >>$@
+ echo "\section{Codepage 1251}" >>$@
+ for i in $(DOCS_CYR_1251); do echo "\input{$$i}" >>$@; done
+# echo "\ienc{iso-8859-7}" >>$@
+# echo "\fenc{LGR}" >>$@
+# echo "\chapter{Other scripts}" >>$@
+# for i in $(DOCS_OTHER); do echo "\input{$$i}" >>$@; done
+# FIXME: UTF8 encoding
+# echo "\section{UTF-8 scripts}" >>$@
+# for i in $(DOCS_UTF8); do echo "\input{$$i}" >>$@; done
+# echo "\ienc{utf8}" >>$@
+
+# whether to build docs
+if BUILDRULES
+
+if BUILDDOCS
+alphabets-doc.pdf : alphabets-doc.tex alphabets-inc.tex
+ pdflatex -interaction batchmode $(srcdir)/alphabets-doc.tex
+ pdflatex -interaction batchmode $(srcdir)/alphabets-doc.tex
+
+PDFS = alphabets-doc.pdf
+
+doc_DATA = $(PDFS)
+
+endif # (end BUILDDOCS)
+
+endif # end (BUILDRULES)
+
+DOC_CLEAN = \
+ alphabets-doc.aux \
+ alphabets-doc.log \
+ alphabets-doc.out \
+ alphabets-doc.pdf \
+ alphabets-inc.tex \
+ alphabets-doc.toc
+
+EXTRA_DIST += $(SCRS) test.xdy
+
+CLEANFILES += $(nobase_nodist_lang_DATA) $(DOCS) $(DOC_CLEAN)
+
diff -ur -x Makefile.in -x autom4te.cache xindy-2.4.orig/make-rules/alphabets/lang.defs xindy-2.4/make-rules/alphabets/lang.defs
--- xindy-2.4.orig/make-rules/alphabets/lang.defs 1970-01-01 01:00:00.000000000 +0100
+++ xindy-2.4/make-rules/alphabets/lang.defs 2010-01-10 22:08:23.000000000 +0100
@@ -0,0 +1,45 @@
+albanian UTF8_LAT LATIN1
+belarusian UTF8_CYR CYR_ISO88595 CYR_ISOIR111 CYR_1251
+bulgarian UTF8_CYR CYR_ISO88595 CYR_KOI8_R CYR_1251
+croatian UTF8_LAT CP1250 LATIN2
+czech UTF8_LAT CP1250 LATIN2
+danish UTF8_LAT CP1252 LATIN9
+dutch ij-as-ij UTF8_LAT LATIN1 ij-as-y UTF8_LAT
+english UTF8_LAT CP1252 LATIN9
+esperanto UTF8_LAT LATIN3
+estonian UTF8_LAT CP1252 LATIN9
+finnish UTF8_LAT CP1252 LATIN9
+french UTF8_LAT CP1252 LATIN9
+general UTF8_LAT CP1252 CP850 LATIN9
+georgian UTF8_OTHER
+german braille UTF8_OTHER din5007 UTF8_LAT LATIN1 duden UTF8_LAT LATIN1
+greek UTF8_OTHER ISO88597 polytonic UTF8_OTHER translit UTF8_LAT LATIN4
+gypsy northrussian UTF8_LAT
+hausa UTF8_LAT
+hebrew UTF8_OTHER ISO88598
+hungarian UTF8_LAT CP1250 LATIN2
+icelandic UTF8_LAT CP1252 LATIN9
+italian UTF8_LAT LATIN1
+klingon UTF8_OTHER
+kurdish bedirxan UTF8_LAT LATIN5 turkish-i UTF8_LAT LATIN5
+latin UTF8_LAT
+latvian UTF8_LAT LATIN4
+lithuanian UTF8_LAT LATIN4
+lower-sorbian UTF8_LAT CP1250 LATIN2
+macedonian UTF8_CYR CYR_ISO88595 CYR_ISOIR111 CYR_1251
+mongolian cyrillic UTF8_CYR cyrillic
+norwegian UTF8_LAT LATIN1
+polish UTF8_LAT CP1250 LATIN2
+portuguese UTF8_LAT LATIN1
+romanian UTF8_LAT LATIN2
+russian UTF8_CYR CYR_ISO88595 CYR_KOI8_R CYR_1251 translit-iso UTF8_LAT
+serbian UTF8_CYR CYR_ISO88595 CYR_ISOIR111 CYR_1251
+slovak large UTF8_LAT CP1250 LATIN2 small UTF8_LAT CP1250 LATIN2
+slovenian UTF8_LAT CP1250 LATIN2
+spanish modern UTF8_LAT LATIN1 traditional UTF8_LAT LATIN1
+swedish UTF8_LAT CP1252 LATIN9
+test1
+turkish UTF8_LAT LATIN3 LATIN5
+upper-sorbian UTF8_LAT CP1250 LATIN2
+ukrainian UTF8_CYR CYR_KOI8_U CYR_1251
+vietnamese UTF8_LAT
diff -ur -x Makefile.in -x autom4te.cache xindy-2.4.orig/make-rules/alphabets/mk-lang.sh xindy-2.4/make-rules/alphabets/mk-lang.sh
--- xindy-2.4.orig/make-rules/alphabets/mk-lang.sh 1970-01-01 01:00:00.000000000 +0100
+++ xindy-2.4/make-rules/alphabets/mk-lang.sh 2010-01-13 13:51:57.000000000 +0100
@@ -0,0 +1,213 @@
+#! /bin/sh
+
+# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in the file COPYING; if not, write to the
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+# Generate the Makefile fragments lang/Makefile.am from language
+# definitions in lang.defs containing lines:
+# lang [[prefix] UTF8_DOC [DOC]...]...
+# where
+# prefix is an optional filename prefix, without final '-'
+# UTF8_DOC is a DOCS_UTF8_* variable, without leading 'DOCS_'
+# DOC is an other DOCS_* variable, without leading 'DOCS_'
+
+CP_DOCS='CP1250 CP1252 CP850'
+LATIN_DOCS='LATIN1 LATIN2 LATIN3 LATIN4 LATIN5 LATIN9'
+CYR_DOCS='CYR_1251 CYR_ISO88595 CYR_ISOIR111 CYR_KOI8_R CYR_KOI8_U'
+ISO_DOCS='ISO88597 ISO88598'
+UTF_DOCS='UTF8_LAT UTF8_CYR UTF8_OTHER'
+
+ALL_DOCS="$CP_DOCS $LATIN_DOCS $CYR_DOCS $ISO_DOCS $UTF_DOCS"
+
+err_exit () {
+ echo "bad argument \"$arg\""
+ exit 1
+}
+
+do_XDY () {
+ XDY="$XDY $name"
+ eval DOCS_$arg="\"\$DOCS_$arg $name\""
+}
+
+do_UTF8 () {
+ PLIN="$PLIN $name"
+ do_XDY
+}
+
+do_CODE () {
+ PL="$PL $name"
+ do_XDY
+}
+
+parse_lang () {
+ for DOC in $ALL_DOCS; do
+ eval DOCS_$DOC=
+ done
+ PLIN= PL= XDY=
+ lang=$1
+ shift
+ pref=
+ for arg
+ do
+ case $arg in
+ [a-z]*) pref="$arg-";;
+ UTF8_*) name=${pref}utf8; do_UTF8;;
+ [A-Z]*) case $arg in
+ CP*) val="cp${arg:2}";;
+ ISO*) val="iso${arg:3}";;
+ LATIN*) val="latin${arg:5}";;
+ CYR_1251) val=cp1251;;
+ CYR_ISO88595) val=iso88595;;
+ CYR_ISOIR111) val=isoir111;;
+ CYR_KOI8_R) val=koi8-r;;
+ CYR_KOI8_U) val=koi8-u;;
+ *) err_exit;;
+ esac
+ name="$pref$val"
+ do_CODE
+ ;;
+ *) err_exit;;
+ esac
+ done
+}
+
+print_header () {
+ cat <<-_EOF
+ ## Makefile fragment for $lang.
+
+ ## Copyright (C) 2009, 2010 by Peter Breitenlohner.
+ ## Copyright (C) 2004-2005 by Gour.
+ ##
+ ## This program is free software; you can redistribute it and/or
+ ## modify it under the terms of the GNU General Public License as
+ ## published by the Free Software Foundation; either version 2 of the
+ ## License, or (at your option) any later version.
+ ##
+ ## This program is distributed in the hope that it will be useful, but
+ ## WITHOUT ANY WARRANTY; without even the implied warranty of
+ ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ## General Public License for more details.
+ ##
+ ## You should have received a copy of the GNU General Public License
+ ## along with this program in the file COPYING; if not, write to the
+ ## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ ## Boston, MA 02110-1301 USA.
+
+ subdirs += $lang
+ _EOF
+}
+
+print_xdy () {
+ test $# -eq 0 && return
+ printf '\nnobase_nodist_lang_DATA +='
+ for xdy
+ do
+ printf ' \\\n\t'$lang'/%s-lang.xdy' $xdy
+ printf ' \\\n\t'$lang'/%s-test.xdy' $xdy
+ printf ' \\\n\t'$lang'/%s.xdy' $xdy
+ done
+ printf "\n"
+}
+
+print_docs () {
+ test $# -eq 0 && return
+ printf '\nDOCS_%s +=' $DOC
+ printf ' \\\n\t'$lang'/%s-doc.tex' "$@"
+ printf "\n"
+}
+
+print_extra_hdr () {
+ test -n "$print_extra_hdr_done" && return
+ printf '\nEXTRA_DIST +='
+ print_extra_hdr_done=yes
+}
+
+print_extra () {
+ test $# -eq 0 && return
+ print_extra_hdr
+ printf ' \\\n\t%s' "$@"
+}
+
+print_extra_plin () {
+ test $# -eq 0 && return
+ print_extra_hdr
+ printf ' \\\n\t'$lang'/%s.pl.in' "$@"
+}
+
+print_pl () {
+ test $# -eq 0 && return
+ printf '\ndist_noinst_DATA +='
+ printf ' \\\n\t'$lang'/%s.pl' "$@"
+ printf "\n"
+}
+
+print_clean () {
+ test $# -eq 0 && return
+ printf '\nCLEANFILES +='
+ for clean
+ do
+ case $clean in
+ *utf8) printf ' \\\n\t'$lang'/%s.pl' $clean;;
+ esac
+ printf ' \\\n\t'$lang'/%s.raw' $clean
+ done
+ printf "\n"
+}
+
+make_lang () {
+ print_header
+ print_xdy $XDY
+ for DOC in $ALL_DOCS; do
+ eval print_docs \$DOCS_$DOC
+ done
+ print_extra_hdr_done=
+ case $lang in
+ general) PL="$PL template";;
+ klingon) PL="$PL translit-ascii";;
+ test1) PL="$PL test1";;
+ romanian)
+ cat <<\_EOF
+
+romanian/latin2.pl : romanian/utf8.pl.in
+ sed -e 's/@u{\([^}]*\)}//g;' -f $(srcdir)/rom-comma-kludge.sed <$< | \
+ $(CONVERT_FROM_UTF8)ISO8859-2 >$@
+_EOF
+ print_extra rom-comma-kludge.sed
+ ;;
+ esac
+ print_extra_plin $PLIN
+ test -n "$print_extra_hdr_done" && printf '\n'
+ print_pl $PL
+ print_clean $XDY
+ echo
+}
+
+all_langs () {
+ while read line
+ do
+ parse_lang $line
+ mkdir -p $lang
+ make_lang >$lang/Makefile.tmp
+ if diff $lang/Makefile.tmp $lang/Makefile.am >/dev/null 2>&1; then
+ rm -f $lang/Makefile.tmp
+ else
+ mv -f $lang/Makefile.tmp $lang/Makefile.am
+ fi
+ done
+}
+
+all_langs < lang.defs
|