]> git.lyx.org Git - lyx.git/blob - po/Rules-lyx
prepare Qt 5.6 builds
[lyx.git] / po / Rules-lyx
1 # LyX specific code to generate lyx.pot
2
3 DISTFILES.common.extra2 = lyx_pot.py postats.py pocheck.pl Makefile.in \
4         Rules-lyx
5
6 POTFILE_IN_DEPS = $(shell find $(top_srcdir)/src -name Makefile.am)
7
8 $(DOMAIN).pot-update: l10n_pots
9
10 # The ui_*.h and moc_*.cpp filters must match the patterns in src/frontends/qt4/Makefile.am
11 ${srcdir}/POTFILES.in: $(POTFILE_IN_DEPS)
12         LC_ALL=C ; export LC_ALL ; \
13         rm -f $@-t \
14         && ( cd $(top_srcdir); \
15              grep -l "_(\".*\")" `find src \( \( -name '*.h' -a ! -name 'ui_*.h' \) -o \( -name '*.cpp' -a ! -name 'moc_*.cpp' \) \) -print` |\
16              sort | uniq ) > $@-t \
17         && mv $@-t $@
18
19 l10n_pots: qt4_l10n.pot layouts_l10n.pot languages_l10n.pot latexfonts_l10n.pot encodings_l10n.pot ui_l10n.pot external_l10n.pot formats_l10n.pot
20         cat $^ | msguniq -o $(DOMAIN).po
21         rm $^
22
23 LYX_POT = LC_ALL=C ; export LC_ALL ; \
24   $(PYTHON) $(srcdir)/lyx_pot.py -b $(top_srcdir)
25
26 qt4_l10n.pot: $(top_srcdir)/src/frontends/qt4/ui/*.ui
27         $(LYX_POT) -o $@ -t qt4 $^
28
29 layouts_l10n.pot: $(top_srcdir)/lib/layouts/*.layout \
30                 $(top_srcdir)/lib/layouts/*.inc \
31                 $(top_srcdir)/lib/layouts/*.module
32         $(LYX_POT) -o $@ -t layouts $^
33
34 #FIXME: I am not sure what this does. Why read the po files in this case?
35 $(top_srcdir)/lib/layouttranslations: $(POFILES) $(top_srcdir)/lib/layouts/*.layout \
36                 $(top_srcdir)/lib/layouts/*.inc $(top_srcdir)/lib/layouts/*.module
37         $(LYX_POT) -o $@ -t layouttranslations ${top_srcdir}/lib/layouts/*.layout ${top_srcdir}/lib/layouts/*.inc ${top_srcdir}/lib/layouts/*.module
38
39 languages_l10n.pot: $(top_srcdir)/lib/languages
40         $(LYX_POT) -o $@ -t languages $^
41
42 latexfonts_l10n.pot: $(top_srcdir)/lib/latexfonts
43         $(LYX_POT) -o $@ -t latexfonts $^
44
45 encodings_l10n.pot: $(top_srcdir)/lib/encodings
46         $(LYX_POT) -o $@ -t encodings $^
47
48 ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui $(top_srcdir)/lib/ui/*.inc
49         $(LYX_POT) -o $@ -t ui $^
50
51 external_l10n.pot: $(top_srcdir)/lib/external_templates
52         $(LYX_POT) -o $@ -t external $^
53
54 formats_l10n.pot: $(top_srcdir)/lib/configure.py
55         $(LYX_POT) -o $@ -t formats $^
56
57 # LyX specific code to generate l10n statistics for the web site
58 i18n.inc: $(POFILES) postats.py
59         (cd $(srcdir) ; $(PYTHON) postats.py "$(VERSION)" $(POFILES)) >$@