summaryrefslogtreecommitdiff
path: root/dh_auto_install
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-08-22 22:18:10 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-08-22 22:18:10 -0400
commitcae2e136065a0925ed10e7122b098cf5f3ed4905 (patch)
treed21b26982947ce8cea7f04778dfbbc6ce4394532 /dh_auto_install
parent69b4dec41ea998cd7e245bf5fedb272e2402904d (diff)
dh_auto_install: Improve check for MakeMaker, to avoid passing PREFIX if the Makefile was generated by Module::Build::Compat. Closes: #496157
Diffstat (limited to 'dh_auto_install')
-rwxr-xr-xdh_auto_install7
1 files changed, 5 insertions, 2 deletions
diff --git a/dh_auto_install b/dh_auto_install
index fa21a010..8e7ab907 100755
--- a/dh_auto_install
+++ b/dh_auto_install
@@ -63,10 +63,13 @@ $destdir=cwd()."/".$destdir;
if (-e "Makefile" || -e "makefile" || -e "GNUmakefile") {
$ENV{MAKE}="make" unless exists $ENV{MAKE};
my @params="DESTDIR=$destdir";
- # Special case for MakeMaker.
- if (-e "Makefile.PL") {
+
+ # Special case for MakeMaker generated Makefiles.
+ if (-e "Makefile" &&
+ system('grep -q "generated automatically by MakeMaker" Makefile') == 0) {
push @params, "PREFIX=/usr";
}
+
foreach my $target (qw{install}) {
# Use make -n to check to see if the target would do
# anything. There's no good way to test if a target exists.