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