X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fpo%2FGNUmakefile;h=9849b93546593a2eff8351f432708b95d8f595ae;hb=f4dd6be9654769e883ac8697e8617761760d82ff;hp=a0a33b15d602f8a133dd8dcad40dbeacb617477d;hpb=9ca866101256ba16224730c0036ceb9ca8026f33;p=lilypond.git diff --git a/Documentation/po/GNUmakefile b/Documentation/po/GNUmakefile index a0a33b15d6..9849b93546 100644 --- a/Documentation/po/GNUmakefile +++ b/Documentation/po/GNUmakefile @@ -1,26 +1,39 @@ depth = ../.. -POT_FILES = $(call src-wildcard,*.pot) -PO_FILES = $(call src-wildcard,*.po) -MO_FILES = $(addprefix $(outdir)/, $(PO_FILES:.po=.mo)) -HELP_CATALOGS = $(PO_FILES:%.po=%) -CATALOGS = $(HELP_CATALOGS:$(DOMAIN)=) STEPMAKE_TEMPLATES=podir +LOCALSTEPMAKE_TEMPLATES=lilypond include $(depth)/make/stepmake.make doc-localedir=$(outdir) +LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py) DOMAIN=lilypond-doc +DOC_PO_SOURCES = python/auxiliar/postprocess_html.py \ + scripts/auxiliar/tely-gettext.py scripts/auxiliar/translations-status.py +TELY_FILES = $(shell ls $(depth)/Documentation/*.tely) +TELY_FILES += $(foreach l, $(LANGS), $(shell ls $(depth)/Documentation/$(l)/*.tely)) +LSR_LYS := $(shell ls $(depth)/Documentation/snippets/*.ly) +TELY_FILES += $(LSR_LYS:%.ly=../%.ly) -messages: $(MO_FILES) +messages: $(outdir)/messages + +$(outdir)/messages: $(MO_FILES) for i in $(CATALOGS); do \ mkdir -p $(doc-localedir)/$$i/LC_MESSAGES; \ cp $(outdir)/$$i.mo $(doc-localedir)/$$i/LC_MESSAGES/$(DOMAIN).mo; \ done + touch $@ po-update: - $(PYTHON) $(depth)/buildscripts/texi-langutils.py -d $(outdir) -o doc.pot --gettext ../$(depth)/Documentation/user/lilypond.tely + $(PYTHON) $(auxscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely) + $(foreach i, $(DOC_PO_SOURCES), cp $(top-src-dir)/$(i) $(outdir) &&) true + cd $(outdir) && xgettext --keyword=_doc -cjn -L Python -o buildscripts.pot $(foreach i, $(DOC_PO_SOURCES), $(notdir $(i))) + msgcat -o $(outdir)/doc.pot $(outdir)/buildscripts.pot $(outdir)/texi.pot msgmerge -U lilypond-doc.pot $(outdir)/doc.pot for i in $(CATALOGS); do \ msgmerge -U $$i.po lilypond-doc.pot; \ done + +ifeq ($(out),www) +local-WWW-1: messages +endif