Author: schwern
Date: Thu Sep 18 06:24:32 2008
New Revision: 11816

Modified:
   Module-Build/trunk/   (props changed)
   Module-Build/trunk/lib/Module/Build/Base.pm
   Module-Build/trunk/lib/Module/Build/Compat.pm

Log:
 [EMAIL PROTECTED]:  schwern | 2008-09-18 06:24:09 -0700
 It's necessary to set_install_paths from config when resuming in order to
 make "make install INSTALLSITELIB=foo" emulation work.  It changes the
 installsitelib config value.
 
 Change LIB to alter config rather than set install_path.  This properly
 emulates MakeMaker's behavior and allows "make install INSTALLDIRS=site 
INSTALLSITELIB=foo" to override.
 
 All tests now pass.


Modified: Module-Build/trunk/lib/Module/Build/Base.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Base.pm (original)
+++ Module-Build/trunk/lib/Module/Build/Base.pm Thu Sep 18 06:24:32 2008
@@ -85,6 +85,8 @@
   }
   
   $self->{invoked_action} = $self->{action} ||= 'build';
+
+  $self->_set_install_paths;
   
   return $self;
 }

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 06:24:32 2008
@@ -23,8 +23,17 @@
    VERBINST     => 'verbose',
    INC          => sub { map {(extra_compiler_flags => $_)} 
Module::Build->split_like_shell(shift) },
    POLLUTE      => sub { (extra_compiler_flags => '-DPERL_POLLUTE') },
-   INSTALLDIRS  => sub { installdirs => $convert_installdirs{uc shift()} },
-   LIB          => sub { (install_path => "lib=".shift) },
+   INSTALLDIRS  => sub { (installdirs => $convert_installdirs{uc shift()}) },
+   LIB          => sub {
+       my $lib = shift;
+       my %config = (
+           installprivlib  => $lib,
+           installsitelib  => $lib,
+           installarchlib  => "$lib/$Config{archname}",
+           installsitearch => "$lib/$Config{archname}"
+       );
+       return map { (config => "$_=$config{$_}") } keys %config;
+   },
 
    # Convert INSTALLVENDORLIB and friends.
    (

Reply via email to