]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/po/GNUmakefile
dc3d16144c5936e6349cd5ff34b6a09f343be75b
[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 = python/auxiliar/postprocess_html.py \
12  scripts/build/texi-gettext.py scripts/auxiliar/translations-status.py
13 TELY_FILES = $(shell ls $(depth)/Documentation/user/lilypond*.tely)
14 TELY_FILES += $(foreach l, $(LANGS), $(shell ls $(depth)/Documentation/$(l)/user/lilypond*.tely))
15 LSR_LYS := $(shell ls $(depth)/input/lsr/*.ly)
16 TELY_FILES += $(LSR_LYS:%.ly=../%.ly)
17
18 messages: $(outdir)/messages
19
20 $(outdir)/messages: $(MO_FILES)
21         for i in $(CATALOGS); do \
22           mkdir -p $(doc-localedir)/$$i/LC_MESSAGES; \
23           cp $(outdir)/$$i.mo $(doc-localedir)/$$i/LC_MESSAGES/$(DOMAIN).mo; \
24         done
25         touch $@
26
27 po-update:
28         $(auxscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
29         $(foreach i, $(DOC_PO_SOURCES), cp $(top-src-dir)/$(i) $(outdir) &&) true
30         cd $(outdir) && sed -i -e s/_doc/_/g $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
31         cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i)))
32         msgcat -o $(outdir)/doc.pot $(outdir)/buildscripts.pot $(outdir)/texi.pot
33         msgmerge -U lilypond-doc.pot $(outdir)/doc.pot
34         for i in $(CATALOGS); do \
35           msgmerge -U $$i.po lilypond-doc.pot; \
36         done