build-sys: Update build to install translated manpages

Based on the psmisc build system this now installs the
translated man pages and seems to survive a make distcheck
This commit is contained in:
Craig Small
2021-01-21 21:40:10 +11:00
parent 4aae73e33c
commit e780a60e05
12 changed files with 14850 additions and 11759 deletions
-1
View File
@@ -1 +0,0 @@
*.pot
+52 -12
View File
@@ -48,30 +48,42 @@ PO4A_OPTS = --srcdir $(srcdir) --destdir $(CURDIR) \
--package-name $(PACKAGE) --package-version $(VERSION) \
--msgid-bugs-address "Procps list <procps@freelists.org>"
if USE_PO4A
all-local: all-local-@USE_PO4A@
update-po:
$(PO4A_V) $(PO4A) $(PO4A_OPTS) --force $(srcdir)/po4a.cfg
all-local-no:
all-local-yes: man.stamp
#clean-local:
# rm -rf translated/$(LINGUAS_DIST)
#
# FIXME: Use a stamp file until po4a supports them internally.
man.stamp:
$(PO4A_V) $(PO4A) $(PO4A_OPTS) $(srcdir)/po4a.cfg
$(AM_V_at) touch $@
clean-local: clean-local-@USE_PO4A@
clean-local-no:
clean-local-yes:
rm -rf $(LINGUAS_DIST)
$(AM_V_at) rm -f man.stamp
.PHONY: update-po
procps-man.pot:
# parafiles = $(patsubst %,-m%,$(subst :, ,$(dist_man_MANS)))
# parafiles = $(dist_man_MANS:doc=Ente)
po4a-gettextize -M utf8 --option groff_code=verbatim --option generated --option untranslated="a.RE,\|" --option unknown_macros=untranslated -f man $(patsubst %,-m%,$(subst :, ,$(dist_man_MANS))) -p $@
endif
install-data-local:
install-data-local: install-data-local-@USE_PO4A@
install-data-local-no:
install-data-local-yes:
for lang in $(LINGUAS) ; do \
files=""; \
for trans in $(notdir $(dist_man_MANS)); do \
if [ -f $(CURDIR)/translated/$$lang/$$trans ]; then \
files="$$files $(CURDIR)/translated/$$lang/$$trans"; \
elif [ -f $(srcdir)/translated/$$lang/$$trans ]; then \
files="$$files $(srcdir)/translated/$$lang/$$trans"; \
if [ -f $(CURDIR)/$$lang/$$trans ]; then \
files="$$files $(CURDIR)/$$lang/$$trans"; \
elif [ -f $(srcdir)/$$lang/$$trans ]; then \
files="$$files $(srcdir)/$$lang/$$trans"; \
fi; \
done; \
$(MAKE) install-man \
@@ -79,3 +91,31 @@ install-data-local:
man_MANS="" \
dist_man_MANS="$$files"; \
done
uninstall-local: uninstall-local-@USE_PO4A@
uninstall-local-no:
uninstall-local-yes:
for lang in $(LINGUAS); do \
files=""; \
for trans in $(notdir $(dist_man_MANS)); do \
if [ -f $(CURDIR)/$$lang/$$trans ]; then \
files="$$files $(CURDIR)/$$lang/$$trans"; \
elif [ -f $(srcdir)/$$lang/$$trans ]; then \
files="$$files $(srcdir)/$$lang/$$trans"; \
fi; \
done; \
$(MAKE) uninstall-man \
mandir="$(mandir)/$$lang" \
man_MANS="" \
dist_man_MANS="$$files"; \
done
dist-hook: man.stamp
cp $(srcdir)/man.stamp $(distdir)/
for lang in $(LINGUAS_DIST); do \
cp $(srcdir)/$$lang.po $(distdir); \
cp $(srcdir)/$$lang.add $(distdir); \
$(MKDIR_P) $(distdir)/$$lang; \
cp -r $(srcdir)/$$lang $(distdir)/; \
done
+2143 -1675
View File
File diff suppressed because it is too large Load Diff
+2143 -1677
View File
File diff suppressed because it is too large Load Diff
+2141 -1675
View File
File diff suppressed because it is too large Load Diff
+20 -17
View File
@@ -1,53 +1,56 @@
# Languages for man page
[po4a_langs] de fr pl pt_BR sv uk zh_CN
[po4a_paths] procps-man.pot $lang:$lang.po
[type: man] ../free.1 $lang:translated/$lang/free.1 \
[type: man] ../free.1 $lang:$lang/free.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../kill.1 $lang:translated/$lang/kill.1 \
[type: man] ../kill.1 $lang:$lang/kill.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../pgrep.1 $lang:translated/$lang/pgrep.1 \
[type: man] ../pgrep.1 $lang:$lang/pgrep.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../pidof.1 $lang:translated/$lang/pidof.1 \
[type: man] ../pidof.1 $lang:$lang/pidof.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../pmap.1 $lang:translated/$lang/pmap.1 \
[type: man] ../pmap.1 $lang:$lang/pmap.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../pwdx.1 $lang:translated/$lang/pwdx.1 \
[type: man] ../pwdx.1 $lang:$lang/pwdx.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../skill.1 $lang:translated/$lang/skill.1 \
[type: man] ../skill.1 $lang:$lang/skill.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../slabtop.1 $lang:translated/$lang/slabtop.1 \
[type: man] ../slabtop.1 $lang:$lang/slabtop.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../sysctl.8 $lang:translated/$lang/sysctl.8 \
[type: man] ../sysctl.8 $lang:$lang/sysctl.8 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../sysctl.conf.5 $lang:translated/$lang/sysctl.conf.5 \
[type: man] ../sysctl.conf.5 $lang:$lang/sysctl.conf.5 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../tload.1 $lang:translated/$lang/tload.1 \
[type: man] ../tload.1 $lang:$lang/tload.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../uptime.1 $lang:translated/$lang/uptime.1 \
[type: man] ../uptime.1 $lang:$lang/uptime.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../vmstat.8 $lang:translated/$lang/vmstat.8 \
[type: man] ../vmstat.8 $lang:$lang/vmstat.8 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../w.1 $lang:translated/$lang/w.1 \
[type: man] ../w.1 $lang:$lang/w.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../watch.1 $lang:translated/$lang/watch.1 \
[type: man] ../watch.1 $lang:$lang/watch.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../ps/ps.1 $lang:translated/$lang/ps.1 \
[type: man] ../ps/ps.1 $lang:$lang/ps.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
[type: man] ../top/top.1 $lang:translated/$lang/top.1 \
[type: man] ../top/top.1 $lang:$lang/top.1 \
add_$lang:?add_$lang/$lang.add opt:"-k 80"
#../watch.1
+2142 -1676
View File
File diff suppressed because it is too large Load Diff
+2142 -1677
View File
File diff suppressed because it is too large Load Diff
+2143 -1675
View File
File diff suppressed because it is too large Load Diff
+1909 -1668
View File
File diff suppressed because it is too large Load Diff