diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-05-09 02:16:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-05-09 02:16:42 +0000 |
commit | 850548c68429dc7675577fad34c54fc907e67777 (patch) | |
tree | f8a51e119dc33ec7808d8b4c3c96351d9f6324a4 /gnu/usr.bin/perl/lib | |
parent | 9891bec8eb3d751912a9139b6552c207025c8aa5 (diff) |
Deal with colon-separated paths in *libexp variables. This is a
hack and I may simply change those variables to point to a single
pathname.
Diffstat (limited to 'gnu/usr.bin/perl/lib')
-rw-r--r-- | gnu/usr.bin/perl/lib/ExtUtils/MM_Unix.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/lib/ExtUtils/MM_Unix.pm b/gnu/usr.bin/perl/lib/ExtUtils/MM_Unix.pm index 35346577202..29d8309d6af 100644 --- a/gnu/usr.bin/perl/lib/ExtUtils/MM_Unix.pm +++ b/gnu/usr.bin/perl/lib/ExtUtils/MM_Unix.pm @@ -8,8 +8,8 @@ use strict; use vars qw($VERSION $Is_Mac $Is_OS2 $Is_VMS $Is_Win32 $Is_Dos $Is_PERL_OBJECT $Verbose %pm %static $Xsubpp_Version); -$VERSION = substr q$Revision: 1.4 $, 10; -# $Id: MM_Unix.pm,v 1.4 1999/04/29 22:51:51 millert Exp $ +$VERSION = substr q$Revision: 1.5 $, 10; +# $Id: MM_Unix.pm,v 1.5 1999/05/09 02:16:41 millert Exp $ Exporter::import('ExtUtils::MakeMaker', qw( $Verbose &neatvalue)); @@ -126,6 +126,7 @@ sub catfile { return $self->canonpath($file) unless @_; my $dir = $self->catdir(@_); for ($dir) { + $_ =~ s/:.*$//; $_ .= "/" unless substr($_,length($_)-1,1) eq "/"; } return $self->canonpath($dir.$file); @@ -1603,7 +1604,12 @@ from the perl source tree. # we should also consider $ENV{PERL5LIB} here $self->{PERL_LIB} ||= $Config::Config{privlibexp}; $self->{PERL_ARCHLIB} ||= $Config::Config{archlibexp}; - $self->{PERL_INC} = $self->catdir("$self->{PERL_ARCHLIB}","CORE"); # wild guess for now + foreach (split(':', $self->{PERL_ARCHLIB})) { + last if (-d ($self->{PERL_INC} = $self->catdir($_, "CORE"))); + } + # use the primary path compenents of privlibexp and archlibexp + $self->{PERL_LIB} =~ s/:.*//; + $self->{PERL_ARCHLIB} =~ s/:.*//; my $perl_h; unless (-f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h"))){ die qq{ |