]> git.ipfire.org Git - thirdparty/util-linux.git/blob - po-man/Makefile.am
po-man: add fr.po (from translationproject.org)
[thirdparty/util-linux.git] / po-man / Makefile.am
1
2 PO_FILES = $(wildcard *.po)
3 PO_LANGS = $(PO_FILES:.po=)
4
5 PO_STAMPS = po4a-gen.stamp
6 MAN_SECTIONS = 1 3 5 8
7 CLEANFILES = $(PO_STAMPS)
8
9 EXTRA_DIST = README.md $(PO_FILES) po4a.cfg util-linux-man.pot
10
11 if ENABLE_POMAN
12 util-linux-man.pot: Makefile
13 $(AM_V_GEN) $(PO4A) --verbose --no-translations po4a.cfg
14
15 po4a-gen.stamp: $(PO_FILES)
16 @echo 'po4a: generate man-pages translations'
17 $(AM_V_GEN) $(PO4A) po4a.cfg
18 @touch po4a-gen.stamp
19
20 gen-trans: $(PO_STAMPS)
21
22 asciidoc_man_cmd = $(ASCIIDOCTOR) \
23 -b manpage \
24 -a 'VERSION=$(VERSION)' \
25 -a 'ADJTIME_PATH=$(ADJTIME_PATH)'
26
27 gen-mans: gen-trans
28 @for l in $(PO_LANGS); do \
29 gendir="$(abs_builddir)/$$l"; \
30 genfiles=`echo $${gendir}/*.adoc`; \
31 if test "$$genfiles" != '$${gendir}/*.adoc'; then \
32 for file in $${genfiles}; do \
33 manname=`echo $$file | sed -e 's|^.*/||' -e 's|\.adoc||'`; \
34 test -f $${gendir}/$${manname} || { \
35 echo " GEN " $$l ": " $$manname && \
36 $(asciidoc_man_cmd) \
37 --base-dir=$${gendir} \
38 --destination-dir $${gendir} $${file}; \
39 }; \
40 done; \
41 fi; \
42 done
43 all: gen-mans
44
45 clean-local:
46 rm -f *~ *.bak
47
48 distclean-local:
49 rm -rf $(PO_LANGS) *.stamp
50
51 install-data-local: gen-mans
52 @for l in $(PO_LANGS); do \
53 mansrcdir="$(abs_builddir)/$$l"; \
54 for s in $(MAN_SECTIONS); do \
55 installfiles=`echo $${mansrcdir}/*.$$s`; \
56 if test "$$installfiles" != '$${mansrcdir}/*.$$s'; then \
57 installdir="$(DESTDIR)$(mandir)/$$l/man$$s"; \
58 $(MKDIR_P) "$${installdir}" || exit 1; \
59 for file in $$installfiles; do \
60 manname=`echo $$file | sed -e 's|^.*/||'`; \
61 echo " Installing " $$l ": " $$manname ; \
62 $(INSTALL_DATA) $$file $${installdir}; \
63 done; \
64 fi; \
65 done; \
66 done
67
68 uninstall-local:
69 @for l in $(PO_LANGS); do \
70 mansrcdir="$(abs_builddir)/$$l"; \
71 for s in $(MAN_SECTIONS); do \
72 installfiles=`echo $${mansrcdir}/*.$$s`; \
73 if test "$$installfiles" != '$${mansrcdir}/*.$$s'; then \
74 installdir="$(DESTDIR)$(mandir)/$$l/man$$s"; \
75 for file in $$installfiles; do \
76 manname=`echo $$file | sed -e 's|^.*/||'`; \
77 echo " Uninstalling " $$l ": " $$manname ; \
78 rm -f $${installdir}/$${manname}; \
79 done; \
80 fi; \
81 done; \
82 done
83
84 else
85 gen-trans:
86 gen-mans:
87 all:
88 distclean-local:
89 clean-local:
90 endif