Subject: | MakeMaker in Win32 makes bad Makefile if PREFIX not set |
This bug breaks the install of SpamAssassin under Windows unless there is an explicit PREFIX=something on the perl Makefile.PL command line.
Using ActivePerl 5.6.1 and ActivePerl 5.8.1 under Windows XP both produce the same results. Perl is installed in C:\Perl directory. C:\Perl\bin is in the path.
This works with MakeMaker 5.45, is broken in Makemaker 6.05 and in 6.21. I didn't test other versions.
I used the Makefile.PL from the latest CVS version of SpamAssassin, available at http://www.spamassassin.org
If run perl Makefile.PL without specifying PREFIX=something, the generated Makefile contains the following correct lines when using MakeMaker 5.45:
PREFIX = C:\Perl
PERLPREFIX = $(PREFIX)
SITEPREFIX = $(PREFIX)
But with MakeMaker 6.05 and with 6.21, it contains the following lines:
PREFIX = $(SITEPREFIX)
PERLPREFIX = C:\Perl
SITEPREFIX = C:\Perl\site
which breaks everything because $(SITEPREFIX) is not yet defined when it is used. Besides, that's the wrong default for PREFIX. According to the perldoc it is supposed to default to installprefix.
If I run perl -V:installprefix I get
C:\Perl
I'm not in a position to determine if this is really the same as bug #3275, but the strange errors that result from PREFIX being set weird look similar and are misleading.