]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/po/GNUmakefile
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / po / GNUmakefile
1 depth = ../..
2
3 STEPMAKE_TEMPLATES=podir
4
5 include $(depth)/make/stepmake.make
6
7 doc-localedir=$(outdir)
8 LANGS = $(shell $(PYTHON) $(buildscript-dir)/langdefs.py)
9 DOMAIN=lilypond-doc
10 DOC_PO_SOURCES = add_html_footer.py texi-gettext.py
11 TELY_FILES = $(shell ls $(depth)/Documentation/user/lilypond*.tely)
12 TELY_FILES += $(foreach l, $(LANGS), $(shell ls $(depth)/Documentation/$(l)/user/lilypond*.tely))
13
14 messages: $(outdir)/messages
15
16 $(outdir)/messages: $(MO_FILES)
17         for i in $(CATALOGS); do \
18           mkdir -p $(doc-localedir)/$$i/LC_MESSAGES; \
19           cp $(outdir)/$$i.mo $(doc-localedir)/$$i/LC_MESSAGES/$(DOMAIN).mo; \
20         done
21         touch $@
22
23 po-update:
24         $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
25         $(foreach i, $(DOC_PO_SOURCES), cp $(buildscript-dir)/$(i) $(outdir) &&) true
26         cd $(outdir) && sed -i -e s/_doc/_/g $(DOC_PO_SOURCES)
27         cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(DOC_PO_SOURCES)
28         msgcat -o $(outdir)/doc.pot $(outdir)/buildscripts.pot $(outdir)/texi.pot
29         msgmerge -U lilypond-doc.pot $(outdir)/doc.pot
30         for i in $(CATALOGS); do \
31           msgmerge -U $$i.po lilypond-doc.pot; \
32         done