Makefile: install man/ru/* v2.2.0_alpha152
authorZac Medico <zmedico@gentoo.org>
Mon, 14 Jan 2013 17:16:14 +0000 (09:16 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 14 Jan 2013 17:16:14 +0000 (09:16 -0800)
Makefile

index f5263f3622e1ab5cfeecbb8ea28e25a2bf12085b..247c0546794b3ae759139375df0b69fc0f3b35f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -184,10 +184,16 @@ install:
        cd "$(srcdir)"; \
        install -m $(INSMODE) $(DOCS) "$(DESTDIR)$(docdir)"; \
        \
-       for x in 1 5 ; do \
-               install -d -m$(DIRMODE) "$(DESTDIR)$(mandir)/man$$x"; \
-               cd "$(srcdir)/man"; \
-               install -m$(INSMODE) *.$$x "$(DESTDIR)$(mandir)/man$$x"; \
+       for x in "" $$(cd "$(srcdir)/man" && find -type d) ; do \
+               for y in 1 5 ; do \
+                       cd "$(srcdir)/man/$$x"; \
+                       files=$$(echo *.$$y); \
+                       if [ -z "$$files" ] || [ "$$files" = "*.$$y" ]; then \
+                               continue; \
+                       fi; \
+                       install -d -m$(DIRMODE) "$(DESTDIR)$(mandir)/$$x/man$$y"; \
+                       install -m$(INSMODE) *.$$y "$(DESTDIR)$(mandir)/$$x/man$$y"; \
+               done; \
        done; \
        \
        if [ -f "$(srcdir)/doc/portage.html" ] ; then \