build-sys: Install translated manpages

References:
 procps-ng/procps#146
This commit is contained in:
Craig Small 2019-10-31 20:48:15 +11:00
parent d9a485e39e
commit e79095ddcc
2 changed files with 11 additions and 6 deletions

1
NEWS
View File

@ -2,6 +2,7 @@ procps-ng-NEXT
---------------- ----------------
* docs: Use correct symbols for -h option in free.1 Debian #898774 * docs: Use correct symbols for -h option in free.1 Debian #898774
* docs: ps.1 now warns about command name length issue #101 * docs: ps.1 now warns about command name length issue #101
* docs: install translated man pages issue #146
* pgrep: Match on runstate issue #109, Debian #919381 * pgrep: Match on runstate issue #109, Debian #919381
* snice: Fix matching on pid merge #89 * snice: Fix matching on pid merge #89
* top: can now exploit 256-color terminals issue #96 * top: can now exploit 256-color terminals issue #96

View File

@ -7,7 +7,7 @@ get-trans:
rsync -Lrtvz translationproject.org::tp/latest/procps-ng-man-ps/ ps rsync -Lrtvz translationproject.org::tp/latest/procps-ng-man-ps/ ps
rsync -Lrtvz translationproject.org::tp/latest/procps-ng-man-top/ top rsync -Lrtvz translationproject.org::tp/latest/procps-ng-man-top/ top
translate-mans: dist-man-paths $(translated_MANS) translate-mans: $(translated_MANS)
base_langs = $(patsubst %.po,%,$(wildcard *.po)) base_langs = $(patsubst %.po,%,$(wildcard *.po))
top_langs = $(patsubst %.po,%,$(notdir $(wildcard top/*.po))) top_langs = $(patsubst %.po,%,$(notdir $(wildcard top/*.po)))
@ -66,15 +66,19 @@ $(MAN_POT): $(MAN_POT_FILES)
$(eval po4a_manfiles := $(foreach manfile,$^,$(addprefix -m , $(manfile)))) $(eval po4a_manfiles := $(foreach manfile,$^,$(addprefix -m , $(manfile))))
$(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man $(po4a_manfiles) -p $@ $(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man $(po4a_manfiles) -p $@
dist_man_MANS = $(foreach lang, $(all_langs), $(foreach section, $(MAN_SECTIONS), $(wildcard $(lang)/man$(section)/*.$(section)))) man_MANS := $(foreach lang, $(all_langs), $(foreach section, $(MAN_SECTIONS), $(wildcard $(lang)/man$(section)/*.$(section))))
dist-hook: translate-mans dist-hook: translate-mans
echo $(translated_MANS) echo $(translated_MANS)
dist-man-paths: install-data-local: translate-mans
echo $(top_langs) for l in $(base_langs) ; do \
@for p in $(man_paths) ; do \ for sect in `ls $$l` ; do \
echo " $(MKDIR_P) '$$p'"; \ $(MKDIR_P) $(DESTDIR)$(mandir)/$$l/$$sect ; \
for file in `ls $$l/$$sect` ; do \
$(INSTALL_DATA) $$l/$$sect/$$file $(DESTDIR)$(mandir)/$$l/$$sect ; \
done ; \
done ; \
done done
# My Makefile-fu fails me here, I cannot see how to have double-wildcards # My Makefile-fu fails me here, I cannot see how to have double-wildcards