# Fix parallel build issue in gnome-doc-utils makefile # https://bugs.gentoo.org/show_bug.cgi?id=255479 --- a/gnome-doc-utils.make +++ b/gnome-doc-utils.make @@ -251,6 +251,13 @@ _DOC_POFILES = $(if $(DOC_MODULE), .PHONY: po po: $(_DOC_POFILES) +## @ _DOC_MOFILES +## The .mo files used for translating the document +_DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES)) + +.PHONY: mo +mo: $(_DOC_MOFILES) + ## @ _DOC_LC_MODULES ## The top-level documentation files in all other locales _DOC_LC_MODULES = $(if $(DOC_MODULE), \ @@ -311,15 +318,18 @@ $(_DOC_POFILES): $(_xml2po) -e -u $(notdir $@) $$docs); \ fi +$(_DOC_MOFILES): %.mo: %.po + msgfmt -o $@ $< + # FIXME: fix the dependancy # FIXME: hook xml2po up -$(_DOC_LC_DOCS) : $(_DOC_POFILES) +$(_DOC_LC_DOCS) : $(_DOC_MOFILES) $(_DOC_LC_DOCS) : $(_DOC_C_DOCS) if ! test -d $(dir $@); then mkdir $(dir $@); fi if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \ (cd $(dir $@) && \ - $(_xml2po) -e -p \ - "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \ + $(_xml2po) -e -t \ + "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo" \ "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \ cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)