Define portage.const.VCS_DIRS and use it in some modules.
[portage.git] / Makefile
index 697198ebf6f8207e0eb1e3fe343c4fd38b526660..be2e0891b30f33d4613cc35eb3bea969ce13da04 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,10 +29,12 @@ DIRMODE = 0755
 SYSCONFDIR_FILES = etc-update.conf dispatch-conf.conf
 PORTAGE_CONFDIR_FILES = make.globals
 LOGROTATE_FILES = elog-save-summary
-BINDIR_FILES = ebuild egencache emerge portageq quickpkg repoman
-SBINDIR_FILES = archive-conf dispatch-conf emaint emerge-webrsync \
+BINDIR_FILES = ebuild egencache emerge emerge-webrsync \
+       emirrordist portageq quickpkg repoman
+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)
@@ -80,7 +82,6 @@ install:
        cd "$(srcdir)/cnf"; \
        install -m$(INSMODE) $(PORTAGE_CONFDIR_FILES) \
                "$(DESTDIR)$(portage_confdir)"; \
-       ln -sf "..$(portage_confdir)/make.globals" "$(DESTDIR)$(sysconfdir)"; \
        install -m$(INSMODE) "$(srcdir)/cnf/make.conf" \
                "$(DESTDIR)$(portage_confdir)/make.conf.example"; \
        \
@@ -184,10 +185,18 @@ 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 "" $(LINGUAS); do \
+               for y in 1 5 ; do \
+                       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; \
+               done; \
        done; \
        \
        if [ -f "$(srcdir)/doc/portage.html" ] ; then \