X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2FMM_MacOS.pm;h=71eb96952f3fd6550e86d24a674f14c2b5b6322c;hb=5b86572164387fde73051a7dd9281f0f2dbcc081;hp=326ca6dd43c3dc9e942d484da63d17a8be488eea;hpb=69ff8adf802894e0957dae2b89f4e2c30fa38e90;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/MM_MacOS.pm b/lib/ExtUtils/MM_MacOS.pm index 326ca6d..71eb969 100644 --- a/lib/ExtUtils/MM_MacOS.pm +++ b/lib/ExtUtils/MM_MacOS.pm @@ -12,7 +12,7 @@ require ExtUtils::MM_Unix; @ISA = qw( ExtUtils::MM_Any ExtUtils::MM_Unix ); use vars qw($VERSION); -$VERSION = '1.01'; +$VERSION = '1.03'; use Config; use Cwd 'cwd'; @@ -21,6 +21,8 @@ use File::Basename; use File::Spec; use vars qw(%make_data); +my $Mac_FS = eval { require Mac::FileSpec::Unixish }; + use ExtUtils::MakeMaker qw($Verbose &neatvalue); =head1 NAME @@ -240,22 +242,19 @@ Translate relative path names into Mac names. =cut sub macify { - # mmm, better ... and this condition should always be satisified, - # as the module is now distributed with MacPerl, but leave in anyway - if (do 'Mac/FileSpec/Unixish.pm') { - return Mac::FileSpec::Unixish::nativize($_[0]); - } - my($unix) = @_; my(@mac); - $unix =~ s|^\./||; - foreach (split(/[ \t\n]+/, $unix)) { if (m|/|) { - $_ = ":$_"; - s|/|:|g; - } + if ($Mac_FS) { # should always be true + $_ = Mac::FileSpec::Unixish::nativize($_); + } else { + s|^\./||; + s|/|:|g; + $_ = ":$_"; + } + } push(@mac, $_); } @@ -606,7 +605,11 @@ sub constants { XSPROTOARG MACLIBS_68K MACLIBS_PPC MACLIBS_SC MACLIBS_MRC MACLIBS_ALL_68K MACLIBS_ALL_PPC MACLIBS_SHARED SOURCE TYPEMAPS / ) { next unless defined $self->{$tmp}; - push @m, "$tmp = $self->{$tmp}\n"; + if ($tmp eq 'TYPEMAPS' && ref $self->{$tmp}) { + push @m, sprintf "$tmp = %s\n", join " ", @{$self->{$tmp}}; + } else { + push @m, "$tmp = $self->{$tmp}\n"; + } } push @m, q{