From efe47f8f2c7d4e2b7ebedc15dbdd2cc51912b56f Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Thu, 24 Sep 2009 13:21:03 -0500 Subject: 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 Signed-off-by: Shawn O. Pearce diff --git a/perl/Makefile.PL b/perl/Makefile.PL index 320253e..0b9deca 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 } -- cgit v0.10.2-6-g49f6