Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some unix path-building that doesn't work on VMS. #862

Merged
merged 9 commits into from Oct 30, 2012
4 changes: 2 additions & 2 deletions config/auto/perldoc.pm
Expand Up @@ -20,6 +20,7 @@ use strict;
use warnings; use warnings;


use File::Temp qw (tempfile ); use File::Temp qw (tempfile );
use File::Spec qw (catfile );
use base qw(Parrot::Configure::Step); use base qw(Parrot::Configure::Step);
use Parrot::Configure::Utils ':auto'; use Parrot::Configure::Utils ':auto';


Expand All @@ -35,8 +36,7 @@ sub _init {
sub runstep { sub runstep {
my ( $self, $conf ) = @_; my ( $self, $conf ) = @_;


my $slash = $conf->data->get('slash'); my $cmd = File::Spec->catfile($conf->data->get('scriptdirexp_provisional'), q{perldoc});
my $cmd = $conf->data->get('scriptdirexp_provisional') . $slash . q{perldoc};
my ( $fh, $filename ) = tempfile( UNLINK => 1 ); my ( $fh, $filename ) = tempfile( UNLINK => 1 );
my $content = capture_output("$cmd -ud $filename perldoc") || undef; my $content = capture_output("$cmd -ud $filename perldoc") || undef;


Expand Down
3 changes: 2 additions & 1 deletion lib/Parrot/Pmc2c/Pmc2cMain.pm
Expand Up @@ -91,8 +91,9 @@ sub new {
die "Must have key 'args' which is a reference to a list of the remaining arguments" die "Must have key 'args' which is a reference to a list of the remaining arguments"
unless ( defined $allargsref->{args} and ref( $allargsref->{args} ) eq q{ARRAY} ); unless ( defined $allargsref->{args} and ref( $allargsref->{args} ) eq q{ARRAY} );


my $base = File::Spec->catdir($allargsref->{bin},'..','..');
unshift @{ $allargsref->{include} }, unshift @{ $allargsref->{include} },
'.', "$allargsref->{bin}/../..", "$allargsref->{bin}/../../src/pmc", "$allargsref->{bin}/../../src/dynpmc"; '.', $base, File::Spec->catdir($base,'src','pmc'), File::Spec->catdir($base,'src','dynpmc');


foreach my $opt ( qw(nolines) ) { foreach my $opt ( qw(nolines) ) {
if ( !defined $allargsref->{opt}{$opt} ) { if ( !defined $allargsref->{opt}{$opt} ) {
Expand Down
6 changes: 4 additions & 2 deletions lib/Parrot/Pmc2c/VTable.pm
Expand Up @@ -6,6 +6,7 @@ use warnings;
use Storable (); use Storable ();
use Parrot::Vtable (); use Parrot::Vtable ();
use Parrot::Pmc2c::Method (); use Parrot::Pmc2c::Method ();
use File::Spec ();
use File::Basename; use File::Basename;
use Cwd qw(cwd); use Cwd qw(cwd);


Expand Down Expand Up @@ -51,8 +52,9 @@ sub dump {
my ($self) = @_; my ($self) = @_;


my $dump_filename = my $dump_filename =
cwd() . q{/} File::Spec->catfile( cwd(),
. basename( Parrot::Pmc2c::UtilFunctions::filename( $self->filename, '.dump' ) ); basename( Parrot::Pmc2c::UtilFunctions::filename( $self->filename, '.dump' ) )
);
Storable::nstore( $self, $dump_filename ); Storable::nstore( $self, $dump_filename );
return $dump_filename; return $dump_filename;
} }
Expand Down
7 changes: 4 additions & 3 deletions tools/build/pmc2c.pl
Expand Up @@ -5,8 +5,9 @@
use warnings; use warnings;
use Getopt::Long (); use Getopt::Long ();
use FindBin qw($Bin); use FindBin qw($Bin);
use lib "$Bin/../lib"; # install location use File::Spec ();
use lib "$Bin/../../lib"; # build location use lib File::Spec->catdir($Bin,'..','lib'); # install location
use lib File::Spec->catdir($Bin,'..','..','lib'); # build location
use Parrot::Pmc2c::Pmc2cMain (); use Parrot::Pmc2c::Pmc2cMain ();


my ( %action, %options, @pmc_include_paths ); my ( %action, %options, @pmc_include_paths );
Expand Down Expand Up @@ -42,7 +43,7 @@
); );


if ( $action{default} ) { if ( $action{default} ) {
$self->dump_vtable("$Bin/../../src/vtable.tbl"); $self->dump_vtable(File::Spec->catfile($Bin,'..','..','src','vtable.tbl'));
exit; exit;
} }


Expand Down