aboutsummaryrefslogtreecommitdiff
path: root/gnome-doc-utils.make
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-05-04 07:51:21 +0200
committerGuido Günther <agx@sigxcpu.org>2010-05-04 07:51:21 +0200
commit29320e2db78ba6e6b56af39219b0ce213b77592b (patch)
treeab74eb3246190f92d2b7a3eb82aa73c7d5a8f67b /gnome-doc-utils.make
parentImported Upstream version 0.15 (diff)
downloadkrb5-auth-dialog-29320e2db78ba6e6b56af39219b0ce213b77592b.tar.gz
krb5-auth-dialog-29320e2db78ba6e6b56af39219b0ce213b77592b.tar.bz2
krb5-auth-dialog-29320e2db78ba6e6b56af39219b0ce213b77592b.zip
Imported Upstream version 0.16~rc1
Diffstat (limited to 'gnome-doc-utils.make')
-rw-r--r--gnome-doc-utils.make24
1 files changed, 20 insertions, 4 deletions
diff --git a/gnome-doc-utils.make b/gnome-doc-utils.make
index ec8f698..97fd549 100644
--- a/gnome-doc-utils.make
+++ b/gnome-doc-utils.make
@@ -266,6 +266,13 @@ _DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \
.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), \
@@ -332,16 +339,23 @@ $(_DOC_POFILES):
$(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
fi
+$(_DOC_MOFILES): %.mo: %.po
+ @if ! test -d $(dir $@); then \
+ echo "mkdir $(dir $@)"; \
+ mkdir "$(dir $@)"; \
+ fi
+ 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; \
- po="$(dir $@)$(patsubst %/$(notdir $@),%,$@).po"; \
- if [ -f "$${po}" ]; then po="../$${po}"; else po="$(_DOC_ABS_SRCDIR)/$${po}"; fi; \
+ mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
+ if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \
(cd $(dir $@) && \
- $(_xml2po) -m $(_xml2po_mode) -e -p "$${po}" \
+ $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \
"$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
@@ -386,12 +400,14 @@ clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
clean-doc-lc:
rm -f $(_DOC_LC_DOCS)
+ rm -f $(_DOC_MOFILES)
@list='$(_DOC_POFILES)'; for po in $$list; do \
if ! test "$$po" -ef "$(srcdir)/$$po"; then \
echo "rm -f $$po"; \
rm -f "$$po"; \
fi; \
done
+# .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
@for lc in C $(_DOC_REAL_LINGUAS); do \
if test -f "$$lc/.xml2po.mo"; then \
echo "rm -f $$lc/.xml2po.mo"; \
bgstack15