From d5e3650fc3906ebad82bc36cf3cf89fc8ac98ee9 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 29 Oct 2019 07:48:50 +1100 Subject: [PATCH] nls: Add all man pages to pot file The previous Makefile rule would only put the first required file into the pot file because it used $< Unfortunately, due to how po4a tools work, its not just a simple matter of changing it to $^ and you're done, but needs a foreach loop to add -m to each manpage file. This is a temporary fix, after some more work looking into po4a the unified tool (called po4a) will be used. --- man-po/Makefile.am | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/man-po/Makefile.am b/man-po/Makefile.am index dc7d0387..c9d8a9f1 100644 --- a/man-po/Makefile.am +++ b/man-po/Makefile.am @@ -55,13 +55,16 @@ MAN_POT_FILES = $(top_srcdir)/free.1 $(top_srcdir)/kill.1 $(top_srcdir)/pgrep.1 DIST_MAN_POTS = $(MAN_PS_POT) $(MAN_TOP_POT) $(MAN_POT) $(MAN_PS_POT): $(MAN_PS_POT_FILES) - $(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man -m $< -p $@ + $(eval po4a_manfiles := $(foreach manfile,$^,$(addprefix -m , $(manfile)))) + $(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man $(po4a_manfiles) -p $@ $(MAN_TOP_POT): $(MAN_TOP_POT_FILES) - $(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man -m $< -p $@ + $(eval po4a_manfiles := $(foreach manfile,$^,$(addprefix -m , $(manfile)))) + $(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man $(po4a_manfiles) -p $@ $(MAN_POT): $(MAN_POT_FILES) - $(PO4A_UPDATEPO) -o translate_joined=MT -o noarg=ME -f man -m $< -p $@ + $(eval po4a_manfiles := $(foreach manfile,$^,$(addprefix -m , $(manfile)))) + $(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)))) dist-hook: translate-mans