summaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2009-09-24 13:21:03 -0500
committerShawn O. Pearce <spearce@spearce.org>2009-09-25 14:00:04 -0700
commitefe47f8f2c7d4e2b7ebedc15dbdd2cc51912b56f (patch)
treeaf250868f8e86da842f56d9c2ffda64a3d5dd9d1 /perl
parenta6dbf8814f433a7fbfa9cde6333c98019f6db1e4 (diff)
downloadgit-efe47f8f2c7d4e2b7ebedc15dbdd2cc51912b56f.tar.gz
perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR
It appears that ExtUtils::MakeMaker versions older than 6.11 do not implement the DESTDIR mechanism. So add a test to the generated perl.mak to detect when DESTDIR is used along with a too old ExtUtils::MakeMaker and abort with a message suggesting the use of NO_PERL_MAKEMAKER. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'perl')
-rw-r--r--perl/Makefile.PL8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 320253eb8e..0b9deca2cc 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -5,6 +5,14 @@ sub MY::postamble {
instlibdir:
@echo '$(INSTALLSITELIB)'
+ifneq (,$(DESTDIR))
+ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
+$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
+ is likely incompatible with the DESTDIR mechanism. Try setting \
+ NO_PERL_MAKEMAKER=1 instead)
+endif
+endif
+
MAKE_FRAG
}