Author: schwern
Date: Thu Sep 18 05:55:33 2008
New Revision: 11815
Modified:
Module-Build/trunk/ (props changed)
Module-Build/trunk/lib/Module/Build/Compat.pm
Log:
[EMAIL PROTECTED]: schwern | 2008-09-18 05:55:07 -0700
Make Compat aware of INSTALL*LIB.
This still doesn't fix compat.t. The problem is that LIB from when the
Makefile.PL was run gets stored in _build as
install_path => { lib => ... }. This means Module::Build uses that rather
than look at the install*lib config values.
LIB shouldn't map to --install_path lib=... It should instead set
installprivlib, installsitelib, installarchlib and installsitearch. I'll
fix that in a moment.
Modified: Module-Build/trunk/lib/Module/Build/Compat.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Compat.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Compat.pm Thu Sep 18 05:55:33 2008
@@ -11,14 +11,33 @@
use Module::Build::ModuleInfo;
use Data::Dumper;
+my %convert_installdirs = (
+ PERL => 'core',
+ SITE => 'site',
+ VENDOR => 'vendor',
+);
+
my %makefile_to_build =
(
TEST_VERBOSE => 'verbose',
VERBINST => 'verbose',
INC => sub { map {(extra_compiler_flags => $_)}
Module::Build->split_like_shell(shift) },
POLLUTE => sub { (extra_compiler_flags => '-DPERL_POLLUTE') },
- INSTALLDIRS => sub { local $_ = shift; (installdirs => (/^perl$/ ? 'core'
: $_)) },
- LIB => sub { (install_path => ('lib='.shift())) },
+ INSTALLDIRS => sub { installdirs => $convert_installdirs{uc shift()} },
+ LIB => sub { (install_path => "lib=".shift) },
+
+ # Convert INSTALLVENDORLIB and friends.
+ (
+ map {
+ my $name = "INSTALL".$_."LIB";
+ $name => sub {
+ my @ret = (config => { lc $name => shift });
+ print STDERR "# Converted to @ret\n";
+
+ return @ret;
+ }
+ } keys %convert_installdirs
+ ),
# Some names they have in common
map {$_, lc($_)} qw(DESTDIR PREFIX INSTALL_BASE UNINST),