From: Nicholas Clark Date: Wed, 4 Feb 2009 19:28:06 +0000 (+0000) Subject: Some refactoring in the loop that constructs parameters for build_extension(). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e08c66ce3962dd9ec38a7094a11b5e4bc2376c00;p=p5sagit%2Fp5-mst-13.2.git Some refactoring in the loop that constructs parameters for build_extension(). --- diff --git a/make_ext.pl b/make_ext.pl index db3a1af..97bc08d 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -176,13 +176,12 @@ if ($is_Win32) { chdir '..'; # now in the Perl build directory } -foreach my $pname (@extspec) { - my $mname = $pname; +foreach my $spec (@extspec) { + my $mname = $spec; $mname =~ s!/!::!g; - my $depth = $pname; - $depth =~ s![^/]+!..!g; - # Always need one more .. for ext/ - my $up = "../$depth"; + my $ext_pathname = "ext/$spec"; + my $up = $ext_pathname; + $up =~ s![^/]+!..!g; if ($Config{osname} eq 'catamount') { # Snowball's chance of building extensions. @@ -191,9 +190,9 @@ foreach my $pname (@extspec) { print "\tMaking $mname ($target)\n"; - build_extension('ext', "ext/$pname", $up, $perl || "$up/miniperl", + build_extension('ext', $ext_pathname, $up, $perl || "$up/miniperl", "$up/lib", - [@pass_through, @{$extra_passthrough{$pname} || []}]); + [@pass_through, @{$extra_passthrough{$spec} || []}]); } sub build_extension {