Respect LINGUAS in 'make install'.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 14 Jan 2013 23:10:34 +0000 (00:10 +0100)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 14 Jan 2013 23:10:34 +0000 (00:10 +0100)
Makefile

index 247c0546794b3ae759139375df0b69fc0f3b35f2..be2e0891b30f33d4613cc35eb3bea969ce13da04 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,6 +34,7 @@ BINDIR_FILES = ebuild egencache emerge emerge-webrsync \
 SBINDIR_FILES = archive-conf dispatch-conf emaint \
        env-update etc-update fixpackages regenworld
 DOCS = ChangeLog NEWS RELEASE-NOTES
+LINGUAS ?= $(shell cd "$(srcdir)/man" && find -mindepth 1 -type d)
 
 ifdef PYTHONPATH
        PYTHONPATH := $(srcdir)/pym:$(PYTHONPATH)
@@ -184,15 +185,17 @@ install:
        cd "$(srcdir)"; \
        install -m $(INSMODE) $(DOCS) "$(DESTDIR)$(docdir)"; \
        \
-       for x in "" $$(cd "$(srcdir)/man" && find -type d) ; do \
+       for x in "" $(LINGUAS); do \
                for y in 1 5 ; do \
-                       cd "$(srcdir)/man/$$x"; \
-                       files=$$(echo *.$$y); \
-                       if [ -z "$$files" ] || [ "$$files" = "*.$$y" ]; then \
-                               continue; \
+                       if [ -d "$(srcdir)/man/$$x" ]; then \
+                               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"; \
                        fi; \
-                       install -d -m$(DIRMODE) "$(DESTDIR)$(mandir)/$$x/man$$y"; \
-                       install -m$(INSMODE) *.$$y "$(DESTDIR)$(mandir)/$$x/man$$y"; \
                done; \
        done; \
        \