[Pkg-isocodes-devel] r1152 - trunk/isoquery/man
toddy-guest at alioth.debian.org
toddy-guest at alioth.debian.org
Tue Nov 13 10:03:13 UTC 2007
Author: toddy-guest
Date: 2007-11-13 10:03:13 +0000 (Tue, 13 Nov 2007)
New Revision: 1152
Modified:
trunk/isoquery/man/Makefile.am
Log:
Distribute and install translated man pages
Modified: trunk/isoquery/man/Makefile.am
===================================================================
--- trunk/isoquery/man/Makefile.am 2007-11-13 10:02:29 UTC (rev 1151)
+++ trunk/isoquery/man/Makefile.am 2007-11-13 10:03:13 UTC (rev 1152)
@@ -18,4 +18,58 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+all-local: man.stamp
+
+# FIXME: Use a stamp file until po4a supports them internally.
+man.stamp:
+ po4a --no-backups --variable srcdir=$(srcdir) \
+ $(srcdir)/isoquery.cfg
+ touch $@
+
+clean-local:
+ po4a --rm-backups --rm-translations --variable srcdir=$(srcdir) \
+ $(srcdir)/isoquery.cfg
+ rm -f man.stamp
+
+update-po:
+ po4a --no-backups --force --variable srcdir=$(srcdir) ./isoquery.cfg
+
+# Extract the list of languages from the po4a config file.
+LINGUAS = $(shell sed -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/isoquery.cfg)
+
+install-data-local:
+ for lang in $(LINGUAS); do \
+ if [ -d $(srcdir)/$$lang ]; then \
+ files=$$(echo $(srcdir)/$$lang/*.[1-9]); \
+ $(MAKE) install-man \
+ mandir="$(mandir)/$$lang" \
+ man_MANS="" \
+ dist_man_MANS="$$files"; \
+ fi \
+ done
+
+uninstall-local:
+ for lang in $(LINGUAS); do \
+ if [ -d $(srcdir)/$$lang ]; then \
+ files=$$(echo $(srcdir)/$$lang/*.[1-9]); \
+ $(MAKE) uninstall-man \
+ mandir="$(mandir)/$$lang" \
+ man_MANS="" \
+ dist_man_MANS="$$files"; \
+ fi \
+ done
+
+dist-hook: man.stamp
+ cp $(srcdir)/man.stamp $(distdir)/
+ for lang in $(LINGUAS); do \
+ cp $(srcdir)/$$lang.po $(distdir)/; \
+ cp $(srcdir)/$$lang.add $(distdir)/; \
+ $(mkdir_p) $(distdir)/$$lang; \
+ cp -r $(srcdir)/$$lang $(distdir)/; \
+ done
+
dist_man_MANS = isoquery.1
+
+EXTRA_DIST = isoquery.cfg isoquery-man.pot
+
+.PHONY: update-po
More information about the Pkg-isocodes-devel
mailing list