Kevin Ryde via RT wrote:
Show quoted text> "Michael G Schwern via RT" <bug-ExtUtils-MakeMaker@rt.cpan.org> writes:
>> But PREFIIX doesn't actually work. Its broken by design.
>
> Well, of course it's supposed to be simply the /usr part of /usr/lib
> etc. It's only programs which spray stuff outside a single tree that
> get themselves into trouble (like perl on msdos or whatever I suppose!
> :-).
Yes, its *supposed* to be simple. But stretch that across nine years of Perl
releases, three different major operating systems (Unix, Windows, VMS),
countless OS variants, different filesystems, at least a half dozen flavors of
make, different shells, different path syntax and vendors doing lord knows
what to Perl installs and it becomes very, very, very not simple.
Debian has done this in the recent past, IIRC it had to do with the /usr/lib
/usr/share split, and OS X currently does this putting things in /Library and
/usr/local with a siteprefix of /usr/local.
Oh, don't forget to make it work on VMS. <--- not a joke
Show quoted text> I think overriding a prefix at the "make install" stage is fairly
> traditional (not just with perl), even if not a fantastically great
> idea. If you already detect the prefix on paths in %Config it could be
> well worth propagating that to the makefile.
I agree, its very traditional. That's not much of an argument, just a
statement. And it doesn't fix the problem(s).
Add to the mix that Perl does not have one prefix but four. PERLPREFIX for
core modules, SITEPREFIX for locally installed modules and VENDORPREFIX for
vendor packaged modules. PREFIX is a fiction to simplify the problem of
installing a single module. The multiple prefixes were put in place to
accommodate, amongst other things, Debian's layout.
So, when someone writes:
perl Makefile.PL
make
make test
make install PREFIX=/some/dir
How does Makefile.PL know in advance to prefix all the INSTALL directories
with PREFIX and not PERL/SITE/VENDORPREFIX? That's the essential problem.
You can tell it you're going to use a single PREFIX like so:
perl Makefile.PL PREFIX=/usr
make
make test
make install PREFIX=/some/other/dir
And then it will know and that will work.
Its complicated and it sucks and its way too late to change. The essential
problem is trying to encode a dynamic situation into a static file (the
Makefile) which is why we made Module::Build.
--
The past has a vote, but not a veto.
-- Mordecai M. Kaplan