Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=5c6415eb9aba304f46cb97250fd5fdbb80b73f36

commit 5c6415eb9aba304f46cb97250fd5fdbb80b73f36
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Thu Nov 22 01:11:16 2007 +0100

initial po4a support
only pot generation is tested properly but more is coming soon

diff --git a/doc/Makefile b/doc/Makefile
index 77f5171..ec4e3e9 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -22,13 +22,32 @@
DOCS = $(wildcard *.txt)
MANS = $(subst .txt,.1,$(DOCS))

+LANGS = $(shell grep '\[po4a_langs\]' po4a.cfg |sed 's/\[po4a_langs\] //')
+
+CONVERT = \
+         if echo $(1)|grep -q /; then \
+         iconv -t $(shell locale -a |grep "$(shell dirname $(1))_.*\."|sed -n 
's/.*\.//;1 p') -f UTF8 < $(1) > tmp; mv tmp $(1); \
+         fi
+
ifneq ($(asciidoc),)
-compile: $(MANS)
+compile: $(MANS) po4a localized_mans
else
compile:
endif

-install:
+po4a:
+ifneq ($(po4a),)
+       po4a -k 0 po4a.cfg
+endif
+
+ifneq ($(po4a),)
+localized_mans: $(shell for i in $(LANGS); do for j in $(MANS); do echo 
$$i/$$j; done; done)
+install-man: install-man1
+else
+localized_mans:
+endif
+
+install: install-man
ifneq ($(asciidoc),)
$(INSTALL) -m644 $(MANS) $(DESTDIR)$(mandir)/man1
endif
@@ -43,3 +62,15 @@ prepare:

%.1: %.txt
a2x -f manpage $^
+
+install-man1:
+       for i in $(LANGS); do \
+               $(INSTALL) -D -m755 $(DESTDIR)$(mandir)/$$i/man1; \
+               for j in $(MANS); do \
+                       $(INSTALL) -m644 $$i/$$j 
"$(DESTDIR)$(mandir)/$$i/man1/$$j"; \
+               done; \
+       done
+
+pot:
+       po4a -k 0 po4a.cfg
+       rm -rf po/*.po $(LANGS)
diff --git a/doc/po/.gitignore b/doc/po/.gitignore
new file mode 100644
index 0000000..e69de29
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to