]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/po/GNUmakefile
Merge branch 'master' of ssh+git://hanwen@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / po / GNUmakefile
index 75d26a6334f5d366ae171564a84a412a725b386b..4542740e1d21e3a45bcf10eb4c22a9e385071ab8 100644 (file)
@@ -5,17 +5,23 @@ STEPMAKE_TEMPLATES=podir
 include $(depth)/make/stepmake.make
 
 doc-localedir=$(outdir)
+LANGS = $(shell $(PYTHON) $(buildscript-dir)/langdefs.py)
 DOMAIN=lilypond-doc
 DOC_PO_SOURCES = add_html_footer.py texi-gettext.py
+TELY_FILES = $(shell ls $(depth)/Documentation/user/lilypond*.tely)
+TELY_FILES += $(foreach l, $(LANGS), $(shell ls $(depth)/Documentation/$(l)/user/lilypond*.tely))
 
-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) $(buildscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext ../$(depth)/Documentation/user/lilypond.tely
+       $(PYTHON) $(buildscript-dir)/texi-langutils.py -d $(outdir) -o texi.pot --gettext $(TELY_FILES:%.tely=../%.tely)
        $(foreach i, $(DOC_PO_SOURCES), cp $(buildscript-dir)/$(i) $(outdir) &&) true
        cd $(outdir) && sed -i -e s/_doc/_/g $(DOC_PO_SOURCES)
        cd $(outdir) && xgettext -cjn -L Python -o buildscripts.pot $(DOC_PO_SOURCES)