]> granicus.if.org Git - psmisc/commitdiff
build-sys: Update building for man translations
authorCraig Small <csmall@dropbear.xyz>
Sun, 13 Nov 2022 04:31:16 +0000 (15:31 +1100)
committerCraig Small <csmall@dropbear.xyz>
Sun, 13 Nov 2022 04:31:16 +0000 (15:31 +1100)
Better logic about how the manpage translations work

References:
 https://gitlab.com/procps-ng/procps/-/commit/5ed8add969b51665794b827b9590040fa209a3a0

Signed-off-by: Craig Small <csmall@dropbear.xyz>
Makefile.am
man-po/Makefile.am

index 7912536d1fe1160851461748198d300587bce80e..251c374697cc755444ba150fb3e4cbce28f07ae0 100644 (file)
@@ -110,6 +110,8 @@ dist-hook:
 get-trans:
        rsync -Lrtvz  translationproject.org::tp/latest/psmisc/  po
        rsync -Lrtvz  translationproject.org::tp/latest/psmisc-man/  man-po
+       rm -f man-po/man.stamp
+       make -C man-po man.stamp
 
 # Programs required for testing only
 check_PROGRAMS = \
index 983262ecc149645d601e2e58c222558c4f11c10a..cf01a17a88fbe18cc6c87091ee228790b3be9fba 100644 (file)
@@ -1,8 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
-#dist_man_MANS = fuser.1 killall.1  peekfd.1  prtstat.1  pslog.1  pstree.1
-#dist_man_MANS = ../doc/peekfd.1 ../doc/prtstat.1 ../doc/pslog.1 ../doc/pstree.1
-dist_man_MANS = ../doc/fuser.1 ../doc/killall.1 ../doc/peekfd.1 ../doc/prtstat.1 ../doc/pslog.1 ../doc/pstree.1
+src_MANS = $(wildcard $(top_srcdir)/doc/*.[1-9])
 
 EXTRA_DIST = \
        po4a.cfg \
@@ -48,9 +46,7 @@ clean-local-yes:
 .PHONY: update-po
 
 psmisc.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 psmisc.pot
+       po4a-gettextize -M utf8 --option groff_code=verbatim --option generated --option untranslated="a.RE,\|" --option unknown_macros=untranslated -f man $(patsubst %,-m%,$(subst :, ,$(src_MANS))) -p psmisc.pot
 
 update-po:
        $(PO4A_V) $(PO4A) $(PO4A_OPTS) --force $(srcdir)/po4a.cfg
@@ -59,7 +55,7 @@ update-po:
 install-data-local:
        for lang in $(LINGUAS); do \
                files=""; \
-               for trans in $(notdir $(dist_man_MANS)); do \
+               for trans in $(notdir $(src_MANS)); do \
                        if [ -f $(CURDIR)/$$lang/$$trans ]; then \
                                files="$$files $(CURDIR)/$$lang/$$trans"; \
                        elif [ -f $(srcdir)/$$lang/$$trans ]; then \
@@ -69,13 +65,13 @@ install-data-local:
                $(MAKE) install-man \
                        mandir="$(mandir)/$$lang" \
                        man_MANS="" \
-                       dist_man_MANS="$$files"; \
+                       src_MANS="$$files"; \
        done
 
 uninstall-local:
        for lang in $(LINGUAS); do \
                files=""; \
-               for trans in $(notdir $(dist_man_MANS)); do \
+               for trans in $(notdir $(src_MANS)); do \
                        if [ -f $(CURDIR)/$$lang/$$trans ]; then \
                                files="$$files $(CURDIR)/$$lang/$$trans"; \
                        elif [ -f $(srcdir)/$$lang/$$trans ]; then \
@@ -85,7 +81,7 @@ uninstall-local:
                $(MAKE) uninstall-man \
                        mandir="$(mandir)/$$lang" \
                        man_MANS="" \
-                       dist_man_MANS="$$files"; \
+                       src_MANS="$$files"; \
        done
 
 dist-hook: man.stamp