diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-09-06 18:50:13 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-09-06 18:50:13 +0100 |
commit | acb65a20b3f3b0f0cee262142e279624eaae58bb (patch) | |
tree | e1d5a7e9bb57fa119d6e214329ad9cef9cb665d7 /make_ext.pl | |
parent | fc1ac930483873cfad5aed4f6cd7739614b9dcc4 (diff) | |
download | perl-acb65a20b3f3b0f0cee262142e279624eaae58bb.tar.gz |
Remove redundant parameters to build_extension().
$ext isn't used. $return_dir is just $up, and $up can be calculated from
$ext_dir. $lib_dir and the default for $perl can be inferred from $up.
Diffstat (limited to 'make_ext.pl')
-rw-r--r-- | make_ext.pl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/make_ext.pl b/make_ext.pl index 64a7d4d21f..85bbacc514 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -194,8 +194,6 @@ foreach my $spec (@extspec) { $copy =~ tr!/!-!; $ext_pathname = "ext/$copy"; } - my $up = $ext_pathname; - $up =~ s![^/]+!..!g; if ($Config{osname} eq 'catamount') { # Snowball's chance of building extensions. @@ -204,14 +202,20 @@ foreach my $spec (@extspec) { print "\tMaking $mname ($target)\n"; - build_extension('ext', $ext_pathname, $up, $perl || "$up/miniperl", - "$up/lib", $mname, + build_extension($ext_pathname, $perl, $mname, [@pass_through, @{$extra_passthrough{$spec} || []}]); } sub build_extension { - my ($ext, $ext_dir, $return_dir, $perl, $lib_dir, $mname, $pass_through) - = @_; + my ($ext_dir, $perl, $mname, $pass_through) = @_; + + my $up = $ext_dir; + $up =~ s![^/]+!..!g; + + $perl ||= "$up/miniperl"; + my $return_dir = $up; + my $lib_dir = "$up/lib"; + unless (chdir "$ext_dir") { warn "Cannot cd to $ext_dir: $!"; return; |