X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debian%2FDebhelper%2FBuildsystem%2Fperl_makemaker.pm;h=e109be5711e4aa96669ddef40bfd5e78a5afacbf;hb=6667158d89b601424b46cb58478922a91620f7e6;hp=07a827ac259914c13c0f94ca304efc02a7b6f8c8;hpb=fdf8b4a8b4b4f50c39b6e4266773539bc13d6e56;p=debhelper.git diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm index 07a827a..e109be5 100644 --- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm +++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm @@ -58,7 +58,17 @@ sub configure { sub install { my $this=shift; my $destdir=shift; - $this->SUPER::install($destdir, "PREFIX=/usr", @_); + + # Special case for Makefile.PL that uses + # Module::Build::Compat. PREFIX should not be passed + # for those; it already installs into /usr by default. + my $makefile=$this->get_sourcepath("Makefile"); + if (system(qq{grep -q "generated automatically by MakeMaker" $makefile}) != 0) { + $this->SUPER::install($destdir, @_); + } + else { + $this->SUPER::install($destdir, "PREFIX=/usr", @_); + } } -1; +1