perl: fix installing modules from contrib
authorChristian Hesse <mail@eworm.de>
Tue, 10 Apr 2018 13:36:41 +0000 (15:36 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Apr 2018 01:29:03 +0000 (10:29 +0900)
Commit 20d2a30f (Makefile: replace perl/Makefile.PL with simple make rules)
removed a target that allowed Makefiles from contrib/ to get the correct
install path. This introduces a new target for main Makefile and fixes
installation for Mediawiki module.

v2: Pass prefix as that can have influence as well, add single quotes
for _SQ variant.

Signed-off-by: Christian Hesse <mail@eworm.de>
Makefile
contrib/mw-to-git/Makefile
index 2091f5f892cc812ccc797172b8f63da059fe8629..75b9ad3b480cbf267abc7335d8d9797707fe55aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1973,6 +1973,8 @@ GIT-PERL-DEFINES: FORCE
                echo "$$FLAGS" >$@; \
            fi
 
+perllibdir:
+       @echo '$(perllibdir_SQ)'
 
 .PHONY: gitweb
 gitweb:
index a4b6f7a2cd4122adbb74a565b34270578b7b6aed..4e603512a39fe209b537cdc47c344c99f7cc38f1 100644 (file)
@@ -21,8 +21,9 @@ HERE=contrib/mw-to-git/
 INSTALL = install
 
 SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
-INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
-                -s --no-print-directory instlibdir)
+INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
+                -s --no-print-directory prefix=$(prefix) \
+                perllibdir=$(perllibdir) perllibdir)
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))