Package: debhelper
Version: 7.2.14
Severity: minor
Tags: patch
Dear Joey,
the dh_auto_install script checks if a Makefile has been generated by
MakeMaker and then overrides its PREFIX variable. However, it is not
only Makefiles generated by MakeMaker that need this variable
overridden. To be honest, every Makefile that I know of that is not
generated by autotools (or similar) does contain a PREFIX variable
that is by default set to PREFIX=/usr/local in most cases. Of source
this variable needs to be overridden whenever this Makefile is called
(well, maybe not in the clean rule).
The attached patch changes the search string to match every possible
way (that I know of) to set a PREFIX variable in the Makefile and
triggers to override it. Please note that the patch only applies to
dh_auto_install, but should by applied against dh_auto_build as well.
Cheers,
Fabian
PS: Maybe it won't even hurt to just pass the PREFIX variable to the
make call without any further checks at all?
--
Dipl.-Phys. Fabian Greffrath
Ruhr-Universität Bochum
Lehrstuhl für Energieanlagen und Energieprozesstechnik (LEAT)
Universitätsstr. 150, IB 3/134
D-44780 Bochum
Telefon: +49 (0)234 / 32-26334
Fax: +49 (0)234 / 32-14227
E-Mail: greffr...@leat.ruhr-uni-bochum.de
--- dh_auto_install.orig 2009-05-26 10:48:34.000000000 +0200
+++ dh_auto_install 2009-05-26 10:49:32.000000000 +0200
@@ -64,9 +64,9 @@
$ENV{MAKE}="make" unless exists $ENV{MAKE};
my @params="DESTDIR=$destdir";
- # Special case for MakeMaker generated Makefiles.
+ # Special case for Makefiles that set their own PREFIX variable.
if (-e "Makefile" &&
- system('grep -q "generated automatically by MakeMaker" Makefile') == 0) {
+ system('grep -q "^PREFIX[[:space:]]*\([:+?]\)\?=" Makefile') == 0) {
push @params, "PREFIX=/usr";
}