summaryrefslogtreecommitdiffstats
path: root/man/generate_translations.mak
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man/generate_translations.mak19
1 files changed, 19 insertions, 0 deletions
diff --git a/man/generate_translations.mak b/man/generate_translations.mak
new file mode 100644
index 0000000..7d242cc
--- /dev/null
+++ b/man/generate_translations.mak
@@ -0,0 +1,19 @@
+LANG=$(notdir $(CURDIR))
+
+if ENABLE_REGENERATE_MAN
+config.xml: ../config.xml.in
+ $(MAKE) -C .. config.xml
+ cp ../config.xml $@
+
+%.xml: ../%.xml ../po/$(LANG).po
+ xml2po --expand-all-entities -l $(LANG) -p ../po/$(LANG).po -o $@ ../$@
+ sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@
+
+include ../generate_mans.mak
+
+else
+$(man_MANS):
+ @echo you need to run configure with --enable-man to generate man pages
+endif
+
+CLEANFILES = .xml2po.mo $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST)) config.xml