package ExtUtils::CBuilder::Platform::VMS;
-$ExtUtils::CBuilder::Platform::VMS::VERSION = '0.280220';
+$ExtUtils::CBuilder::Platform::VMS::VERSION = '0.280224';
+use warnings;
use strict;
use ExtUtils::CBuilder::Base;
return '' unless keys(%args) || @config_defines;
- return ('/define=('
- . join(',',
+ return ('/define=('
+ . join(',',
@config_defines,
- map "\"$_" . ( length($args{$_}) ? "=$args{$_}" : '') . "\"",
- keys %args)
+ map "\"$_" . ( length($args{$_}) ? "=$args{$_}" : '') . "\"",
+ sort keys %args)
. ')');
}
# We override the compile method because we consume the includes and defines
# parts of ccflags in the process of compiling but don't save those parts
# anywhere, so $self->{config}{ccflags} needs to be reset for each compile
-# operation.
+# operation.
sub compile {
my ($self, %args) = @_;
sub _do_link {
my ($self, $type, %args) = @_;
-
+
my $objects = delete $args{objects};
$objects = [$objects] unless ref $objects;
-
+
if ($args{lddl}) {
# prelink will call Mksymlists, which creates the extension-specific
# We now add the rest of what we need to the linker options file. We
# should replicate the functionality of C<ExtUtils::MM_VMS::dlsyms>,
# but there is as yet no infrastructure for handling object libraries,
- # so for now we depend on object files being listed individually on the
+ # so for now we depend on object files being listed individually on the
# command line, which should work for simple cases. We do bring in our
# own version of C<ExtUtils::Liblist::Kid::ext> so that any additional
# libraries (including PERLSHR) can be added to the options file.
my @optlibs = $self->_liblist_ext( $args{'libs'} );
my $optfile = 'sys$disk:[]' . $temp_files[0];
- open my $opt_fh, '>>', $optfile
+ open my $opt_fh, '>>', $optfile
or die "_do_link: Unable to open $optfile: $!";
for my $lib (@optlibs) {print $opt_fh "$lib\n" if length $lib }
close $opt_fh;
# which a system-wide logical may point.
if ($self->perl_src) {
my($lib,$locspec,$type);
- foreach $lib (@crtls) {
+ foreach $lib (@crtls) {
if (($locspec,$type) = $lib =~ m{^([\w\$-]+)(/\w+)?} and $locspec =~ /perl/i) {
if (lc $type eq '/share') { $locspec .= $self->{'config'}{'exe_ext'}; }
elsif (lc $type eq '/library') { $locspec .= $self->{'config'}{'lib_ext'}; }
'socket' => '', 'X11' => 'DECW$XLIBSHR',
'Xt' => 'DECW$XTSHR', 'Xm' => 'DECW$XMLIBSHR',
'Xmu' => 'DECW$XMULIBSHR');
- if ($self->{'config'}{'vms_cc_type'} ne 'decc') { $libmap{'curses'} = 'VAXCCURSE'; }
warn "Potential libraries are '$potential_libs'\n" if $verbose;
next;
}
warn "Resolving directory $dir\n" if $verbose;
- if (!File::Spec->file_name_is_absolute($dir)) {
- $dir = catdir($cwd,$dir);
+ if (!File::Spec->file_name_is_absolute($dir)) {
+ $dir = catdir($cwd,$dir);
}
}
@dirs = grep { length($_) } @dirs;
$type = 'SHR';
$name = $fullname unless $fullname =~ /exe;?\d*$/i;
}
- elsif (not length($ctype) and # If we've got a lib already,
+ elsif (not length($ctype) and # If we've got a lib already,
# don't bother
( -f ($fullname = VMS::Filespec::rmsexpand($name,$lib_ext)) or
-f ($fullname = VMS::Filespec::rmsexpand($name,'.olb')))) {
$type = 'OLB';
$name = $fullname unless $fullname =~ /olb;?\d*$/i;
}
- elsif (not length($ctype) and # If we've got a lib already,
+ elsif (not length($ctype) and # If we've got a lib already,
# don't bother
( -f ($fullname = VMS::Filespec::rmsexpand($name,$obj_ext)) or
-f ($fullname = VMS::Filespec::rmsexpand($name,'.obj')))) {
last if $ctype eq 'SHR';
}
}
- if ($ctype) {
- # This has to precede any other CRTLs, so just make it first
- if ($cand eq 'VAXCCURSE') { unshift @{$found{$ctype}}, $cand; }
- else { push @{$found{$ctype}}, $cand; }
- warn "\tFound as $cand (really $fullname), type $ctype\n"
+ if ($ctype) {
+ push @{$found{$ctype}}, $cand;
+ warn "\tFound as $cand (really $fullname), type $ctype\n"
if $verbose > 1;
push @flibs, $name unless $libs_seen{$fullname}++;
next LIB;