Skip to content

Commit

Permalink
revert prior change to ExtUtils::Install prereq; instead, 'fakeinstall'
Browse files Browse the repository at this point in the history
does nothing without EU::Install 1.32 or later


git-svn-id: http://svn.perl.org/modules/Module-Build/trunk@12484 50811bd7-b8ce-0310-adc1-d9db26280581
  • Loading branch information
xdg committed Feb 8, 2009
1 parent f43a71a commit 4240ea0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Build.PL
Expand Up @@ -34,7 +34,7 @@ my $build = ModuleBuildBuilder->new(
'File::Find' => 0,
'File::Path' => 0,
'File::Spec' => '0.82', # rel2abs()
'ExtUtils::Install' => '1.52', # recommended by Yves
'ExtUtils::Install' => 0,
'ExtUtils::Manifest' => 0,
'ExtUtils::Mkbootstrap' => 0,
'IO::File' => 0,
Expand Down
8 changes: 4 additions & 4 deletions Changes
Expand Up @@ -7,10 +7,10 @@ Revision history for Perl extension Module::Build.
all prerequisites; can be loaded by external tools using eval()
[David Golden]

Other
- bumped ExtUtils::Install prereq to version 1.52 per demerphq's
recommendation

Bug-fixes
- 'fakeinstall' action warns and skips without ExtUtils::Install 1.32+
[David Golden, reported by Zefram]
0.31_02 - Tue Jan 27 09:16:43 PST 2009

Other
Expand Down
8 changes: 8 additions & 0 deletions lib/Module/Build/Base.pm
Expand Up @@ -2959,6 +2959,14 @@ sub ACTION_install {
sub ACTION_fakeinstall {
my ($self) = @_;
require ExtUtils::Install;
my $eui_version = ExtUtils::Install->VERSION;
if ( $eui_version < 1.32 ) {
$self->log_warn(
"The 'fakeinstall' action requires Extutils::Install 1.32 or later.\n"
. "(You only have version $eui_version)."
);
return;
}
$self->depends_on('build');
ExtUtils::Install::install($self->install_map, !$self->quiet, 1, $self->{args}{uninst}||0);
}
Expand Down
36 changes: 22 additions & 14 deletions t/compat.t
Expand Up @@ -215,23 +215,31 @@ ok $mb, "Module::Build->new_from_context";
'Should be non-verbose';

(my $libdir2 = $libdir) =~ s/libdir/lbiidr/;
my @make_args = ('INSTALLDIRS=vendor', "INSTALLVENDORLIB=$libdir2");

if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax.
$make_args[0] = '/macro=("' . join('","',@make_args) . '")';
pop @make_args while scalar(@make_args) > 1;
}
($output) = stdout_stderr_of(
sub {
$ran_ok = $mb->do_system(@make, 'fakeinstall', @make_args);
SKIP: {
require ExtUtils::Install;
skip "Needs ExtUtils::Install 1.32 or later", 2
if ExtUtils::Install->VERSION < 1.32;

my @make_args = ('INSTALLDIRS=vendor', "INSTALLVENDORLIB=$libdir2");

if ($is_vms_mms) { # VMS MMK/MMS macros use different syntax.
$make_args[0] = '/macro=("' . join('","',@make_args) . '")';
pop @make_args while scalar(@make_args) > 1;
}
);

ok $ran_ok, "make fakeinstall with INSTALLDIRS=vendor ran ok";
$output =~ s/^/# /gm; # Don't confuse our own test output
like $output,
qr/\Q$libdir2\E .* Simple\.pm/x,
'Should have installdirs=vendor';
($output) = stdout_stderr_of(
sub {
$ran_ok = $mb->do_system(@make, 'fakeinstall', @make_args);
}
);

ok $ran_ok, "make fakeinstall with INSTALLDIRS=vendor ran ok";
$output =~ s/^/# /gm; # Don't confuse our own test output
like $output,
qr/\Q$libdir2\E .* Simple\.pm/x,
'Should have installdirs=vendor';
}

stdout_of( sub { $mb->do_system(@make, 'realclean'); } );
ok ! -e $makefile, "$makefile shouldn't exist";
Expand Down

0 comments on commit 4240ea0

Please sign in to comment.