]> granicus.if.org Git - procps-ng/commitdiff
build-sys: Install translated manpages
authorCraig Small <csmall@dropbear.xyz>
Thu, 31 Oct 2019 09:48:15 +0000 (20:48 +1100)
committerCraig Small <csmall@dropbear.xyz>
Thu, 31 Oct 2019 09:48:15 +0000 (20:48 +1100)
References:
 procps-ng/procps#146

NEWS
man-po/Makefile.am

diff --git a/NEWS b/NEWS
index 0a009857600d8ddc91b15c119da5ec21e81f337b..b6ed9524d3e515d32f7f9d6a0f6c7563c468f7a1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ procps-ng-NEXT
 ----------------
   * docs: Use correct symbols for -h option in free.1      Debian #898774
   * 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
   * snice: Fix matching on pid                             merge #89
   * top: can now exploit 256-color terminals               issue #96
index c9d8a9f1282e0b33d144a797706c59b5a7532eed..7bba57fe9ed0c8d171039aa46091093f5775f68f 100644 (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-top/  top
 
-translate-mans: dist-man-paths $(translated_MANS)
+translate-mans: $(translated_MANS)
 
 base_langs = $(patsubst %.po,%,$(wildcard *.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))))
        $(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
        echo $(translated_MANS)
 
 
-dist-man-paths:
-       echo $(top_langs)
-       @for p in $(man_paths) ; do \
-           echo " $(MKDIR_P) '$$p'"; \
+install-data-local: translate-mans
+       for l in $(base_langs) ; do \
+           for sect in `ls $$l` ; do \
+             $(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
 
 # My Makefile-fu fails me here, I cannot see how to have double-wildcards