Skip to content

Commit

Permalink
Core::Dev to get dirs more cannily
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Nov 21, 2024
1 parent 8fd98a0 commit ec123cf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Basic/lib/PDL/Core/Dev.pm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ sub _postamble {
? map "\$($_)", pdlpp_mod_vars($mod)
: pdlpp_mod_values($internal, $src, $base, $multi_c);
if ($internal) {
my $ppdir = File::Spec::Functions::abs2rel(catdir(dirname(dirname $w), qw(Basic lib PDL)));
my $ppdir = File::Spec::Functions::abs2rel(catdir($w, qw(PDL)));
$pmdep .= join ' ', '', catfile($ppdir, 'PP.pm'), glob(catfile($ppdir, 'PP/*'));
$cdep .= join ' ', $ppo, ':', map catfile($ppdir, qw(Core), $_),
qw(pdl.h pdlcore.h pdlbroadcast.h pdlmagic.h);
Expand Down Expand Up @@ -261,6 +261,7 @@ sub _stdargs {
$clean .= " \$($mangled_c)";
} else {
%hash = (%hash, OBJECT => "$base\$(OBJ_EXT)");
$clean .= " $base.xs";
}
if ($internal) {
$hash{depend} = {
Expand All @@ -269,7 +270,7 @@ sub _stdargs {
}
(
NAME => $mod,
VERSION_FROM => ($internal ? catfile(dirname($w), qw(lib PDL Core.pm)) : $src),
VERSION_FROM => ($internal ? catfile($w, qw(PDL Core.pm)) : $src),
TYPEMAPS => [PDL_TYPEMAP()],
PM => {"$base.pm" => "\$(INST_LIBDIR)/$base.pm"},
MAN3PODS => {"$base.pm" => "\$(INST_MAN3DIR)/$mod.\$(MAN3EXT)"},
Expand Down
2 changes: 1 addition & 1 deletion Libtmp/GSL/DIFF/t/gsl_diff.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use strict;
use warnings;
use Test::More;
use PDL;
use PDL::LiteF;
use PDL::GSL::DIFF;

my @res = gsldiff(\&myf,1.5);
Expand Down
2 changes: 1 addition & 1 deletion Libtmp/GSL/INTEG/t/gsl_integ.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use strict;
use warnings;
use Test::More;
use PDL;
use PDL::LiteF;
use PDL::GSL::INTEG;

my $alfa = 2.6;
Expand Down
2 changes: 1 addition & 1 deletion Libtmp/GSL/INTERP/t/gsl_interp.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

use strict;
use warnings;
use PDL;
use PDL::LiteF;
use PDL::GSL::INTERP;
use Test::More;

Expand Down
3 changes: 2 additions & 1 deletion Libtmp/GSL/Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use strict;
use warnings;
use ExtUtils::MakeMaker;
use PDL::Core::Dev;

sub get_gsl_config {
my ($flags) = @_;
Expand Down Expand Up @@ -35,7 +36,7 @@ if (!defined($version) or $version =~ /^\s*$/) {
} else {
my @is_parts =split /\./,$version;
my @needed_parts=split /\./,$MINVERSION;

$needed_parts[-1]--;
for (my $i=0; $i<=$#needed_parts; $i++) {
my $is_part=(exists $is_parts[$i] ? $is_parts[$i] : 0);
Expand Down
2 changes: 1 addition & 1 deletion Libtmp/GSL/SF/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use strict;
use warnings;
use ExtUtils::MakeMaker;

our ($GSL_includes, $GSL_libs);
our ($GSL_includes, $GSL_libs);

sub gsl_sf_links_ok {
my($lib,$inc) = @_;
Expand Down

0 comments on commit ec123cf

Please sign in to comment.