Subject: | Overriding INSTALLPRIVLIB causes recursive variable error when PREFIX is set too |
The attached Makefile.PL creates a valid Makefile when invoked without
additional arguments, but when run with a "PREFIX=..." argument it
creates a Makefile with a recursive variable definition, namely,
INSTALLARCHLIB=$(INSTALLARCHLIB).
This problem has come to light as a result of a change made in
IO-Compress-2.022 (resulting from discussions on p5p regarding how best
to cope with a re-arrangement of IO-Compress's installed file
locations), and was reported in CPAN RT #50531.
On my system (Win32, VC9, Perl-5.10.1 installed in C:\perl5,
EU-MM-6.55_02) the differences between the output of "perl Makefile.PL"
and "perl Makefile.PL PREFIX=C:/Temp" are as follows, which is pretty
much what I'd expect, except that the PREFIX version has that recursive
variable definition. I think it should have
INSTALLARCHLIB=$(PERLPREFIX)\lib instead.
--- Makefile.normal 2009-10-28 09:42:13.438253200 +0000
+++ Makefile.prefix 2009-10-28 09:42:59.016378200 +0000
@@ -6,7 +6,7 @@
#
# ANY CHANGES MADE HERE WILL BE LOST!
#
-# MakeMaker ARGV: ()
+# MakeMaker ARGV: (q[PREFIX=C:/Temp])
#
# MakeMaker Parameters:
@@ -43,8 +43,8 @@
SITELIBEXP = C:\perl5\site\lib
SITEARCHEXP = C:\perl5\site\lib
SO = dll
-VENDORARCHEXP =
-VENDORLIBEXP =
+VENDORARCHEXP = $(VENDORPREFIX)\lib\5.10.1\MSWin32-x86-multi-thread
+VENDORLIBEXP = $(VENDORPREFIX)\lib
# --- MakeMaker constants section:
@@ -70,45 +70,45 @@
MAN3EXT = 3
INSTALLDIRS = site
DESTDIR =
-PREFIX = $(SITEPREFIX)
-PERLPREFIX = C:\perl5
-SITEPREFIX = C:\perl5\site
-VENDORPREFIX =
+PREFIX = C:/Temp
+PERLPREFIX = $(PREFIX)
+SITEPREFIX = $(PREFIX)
+VENDORPREFIX = $(PREFIX)
INSTALLPRIVLIB = $(INSTALLARCHLIB)
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
-INSTALLSITELIB = C:\perl5\site\lib
+INSTALLSITELIB = $(SITEPREFIX)\lib
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
-INSTALLVENDORLIB =
+INSTALLVENDORLIB = $(VENDORPREFIX)\lib
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
-INSTALLARCHLIB = C:\perl5\lib
+INSTALLARCHLIB = $(INSTALLARCHLIB)
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
-INSTALLSITEARCH = C:\perl5\site\lib
+INSTALLSITEARCH = $(SITEPREFIX)\lib
DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
-INSTALLVENDORARCH =
+INSTALLVENDORARCH = $(VENDORPREFIX)\lib\5.10.1\MSWin32-x86-multi-thread
DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
-INSTALLBIN = C:\perl5\bin
+INSTALLBIN = $(PERLPREFIX)\bin
DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
-INSTALLSITEBIN = C:\perl5\bin
+INSTALLSITEBIN = $(SITEPREFIX)\bin
DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
-INSTALLVENDORBIN =
+INSTALLVENDORBIN = $(VENDORPREFIX)\bin
DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
-INSTALLSCRIPT = C:\perl5\bin
+INSTALLSCRIPT = $(PERLPREFIX)\bin
DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
INSTALLSITESCRIPT = $(INSTALLSCRIPT)
DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
-INSTALLVENDORSCRIPT =
+INSTALLVENDORSCRIPT = $(VENDORPREFIX)\bin
DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
-INSTALLMAN1DIR = C:\perl5\man\man1
+INSTALLMAN1DIR = $(PERLPREFIX)\man\man1
DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
INSTALLSITEMAN1DIR = $(INSTALLMAN1DIR)
DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
-INSTALLVENDORMAN1DIR =
+INSTALLVENDORMAN1DIR = $(VENDORPREFIX)\man\man1
DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
-INSTALLMAN3DIR = C:\perl5\man\man3
+INSTALLMAN3DIR = $(PERLPREFIX)\man\man3
DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
INSTALLSITEMAN3DIR = $(INSTALLMAN3DIR)
DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
-INSTALLVENDORMAN3DIR =
+INSTALLVENDORMAN3DIR = $(VENDORPREFIX)\man\man3
DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
PERL_LIB = C:\perl5\lib
PERL_ARCHLIB = C:\perl5\lib
@@ -562,7 +562,7 @@
# --- MakeMaker dist_test section:
disttest : distdir
cd $(DISTVNAME)
- $(ABSPERLRUN) Makefile.PL
+ $(ABSPERLRUN) Makefile.PL "PREFIX=C:/Temp"
$(MAKE) $(PASTHRU)
$(MAKE) test $(PASTHRU)
cd ..
@@ -731,7 +731,7 @@
-$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
-$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
- $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
- $(PERLRUN) Makefile.PL
+ $(PERLRUN) Makefile.PL "PREFIX=C:/Temp"
$(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
$(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
$(FALSE)
@@ -752,7 +752,8 @@
$(NOECHO) $(PERLRUNINST) \
Makefile.PL DIR= \
MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
- MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
+ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= \
+ PREFIX=C:/Temp
# --- MakeMaker test section:
End of Patch.
Subject: | Makefile.PL |
use ExtUtils::MakeMaker;
open FH, '>Foo.pm'; print FH "package Foo;\n1;\n"; close FH;
WriteMakefile(NAME => 'Foo', INSTALLPRIVLIB => '$(INSTALLARCHLIB)');