use Perl::OSType qw/os_type/;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
$VERSION = eval $VERSION;
# We only use this once - don't waste a symbol table entry on it.
use File::Temp qw(tempfile);
use vars qw($VERSION);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
# More details about C/C++ compilers:
# http://developers.sun.com/sunstudio/documentation/product/compiler.jsp
}
sub lib_file {
- my ($self, $dl_file) = @_;
+ my ($self, $dl_file, %args) = @_;
$dl_file =~ s/\.[^.]+$//;
$dl_file =~ tr/"//d;
- return "$dl_file.$self->{config}{dlext}";
+
+ if (defined $args{module_name} and length $args{module_name}) {
+ # Need to create with the same name as DynaLoader will load with.
+ require DynaLoader;
+ if (defined &DynaLoader::mod2fname) {
+ my $lib = DynaLoader::mod2fname([split /::/, $args{module_name}]);
+ my ($dev, $lib_dir, undef) = File::Spec->splitpath($dl_file);
+ $dl_file = File::Spec->catpath($dev, $lib_dir, $lib);
+ }
+ }
+
+ $dl_file .= ".$self->{config}{dlext}";
+
+ return $dl_file;
}
my $objects = delete $args{objects};
$objects = [$objects] unless ref $objects;
- my $out = $args{$type} || $self->$type($objects->[0]);
+ my $out = $args{$type} || $self->$type($objects->[0], %args);
my @temp_files;
@temp_files =
use ExtUtils::CBuilder::Base;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Base);
sub link_executable {
use ExtUtils::CBuilder::Base;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Base);
use File::Spec::Functions qw(catfile catdir);
return ("$self->{config}{lddlflags}=$file");
}
-
-sub lib_file {
- my ($self, $dl_file) = @_;
- $dl_file =~ s/\.[^.]+$//;
- $dl_file =~ tr/"//d;
- $dl_file = $dl_file .= '.' . $self->{config}{dlext};
-
- # Need to create with the same name as DynaLoader will load with.
- if (defined &DynaLoader::mod2fname) {
- my ($dev,$dir,$file) = File::Spec->splitpath($dl_file);
- $file = DynaLoader::mod2fname([$file]);
- $dl_file = File::Spec->catpath($dev,$dir,$file);
- }
- return $dl_file;
-}
-
# The following is reproduced almost verbatim from ExtUtils::Liblist::Kid::_vms_ext.
# We can't just call that because it's tied up with the MakeMaker object hierarchy.
use IO::File;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Base);
=begin comment
package ExtUtils::CBuilder::Platform::Windows::BCC;
use vars qw($VERSION);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
sub format_compiler_cmd {
my ($self, %spec) = @_;
package ExtUtils::CBuilder::Platform::Windows::GCC;
use vars qw($VERSION);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
sub format_compiler_cmd {
my ($self, %spec) = @_;
package ExtUtils::CBuilder::Platform::Windows::MSVC;
use vars qw($VERSION);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
sub arg_exec_file {
my ($self, $file) = @_;
use File::Spec;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
use ExtUtils::CBuilder::Platform::Unix;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
# TODO: If a specific exe_file name is requested, if the exe created
use ExtUtils::CBuilder::Platform::Unix;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub compile {
use vars qw($VERSION @ISA);
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
sub link_executable {
my $self = shift;
use ExtUtils::CBuilder::Platform::Unix;
use vars qw($VERSION @ISA);
-$VERSION = '0.280212';
+$VERSION = '0.280213';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
sub need_prelink { 1 }
if ($how eq 'lib_file'
and (defined $args{module_name} and length $args{module_name})) {
- # DynaLoader::mod2fname() is a builtin func
- my $lib = DynaLoader::mod2fname([split /::/, $args{module_name}]);
-
# Now know the basename, find directory parts via lib_file, or objects
my $objs = ( (ref $args{objects}) ? $args{objects} : [$args{objects}] );
my $near_obj = $self->lib_file(@$objs);
- my $ref_file = ( defined $args{lib_file} ? $args{lib_file} : $near_obj );
- my $lib_dir = ($ref_file =~ m,(.*)[/\\],s ? "$1/" : '' );
my $exp_dir = ($near_obj =~ m,(.*)[/\\],s ? "$1/" : '' );
$args{dl_file} = $1 if $near_obj =~ m,(.*)\.,s; # put ExportList near OBJ
- $args{lib_file} = "$lib_dir$lib.$self->{config}{dlext}"; # DLL file
# XXX _do_link does not have place to put libraries?
push @$objs, $self->perl_inc() . "/libperl$self->{config}{lib_ext}";
is $object_file, $b->compile(source => $source_file);
-$lib_file = $b->lib_file($object_file);
+$lib_file = $b->lib_file($object_file, module_name => 'basict');
ok 1;
my ($lib, @temps) = $b->link(objects => $object_file,
is $object_file, $b->compile(source => $source_file, 'C++' => 1);
-$lib_file = $b->lib_file($object_file);
+$lib_file = $b->lib_file($object_file, module_name => 'cplust');
ok 1;
my ($lib, @temps) = $b->link(objects => $object_file,