Skip to content

Commit efe47f8

Browse files
drafnelspearce
authored andcommitted
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 <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent a6dbf88 commit efe47f8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

perl/Makefile.PL

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ sub MY::postamble {
55
instlibdir:
66
@echo '$(INSTALLSITELIB)'
77
8+
ifneq (,$(DESTDIR))
9+
ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
10+
$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
11+
is likely incompatible with the DESTDIR mechanism. Try setting \
12+
NO_PERL_MAKEMAKER=1 instead)
13+
endif
14+
endif
15+
816
MAKE_FRAG
917
}
1018

0 commit comments

Comments
 (0)