Skip to content

Commit

Permalink
make Basic/Makefile.PL work better standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Nov 21, 2024
1 parent c072729 commit 094dd3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Basic/Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use strict;
use warnings;
use 5.014;
use ExtUtils::MakeMaker;
use File::Spec::Functions;
use Config;
use lib qw(lib);
use PDL::Core::Dev;
eval { require Devel::CheckLib; Devel::CheckLib->import; };

my $pdlroot = catfile qw(script pdl);
Expand Down Expand Up @@ -77,6 +79,7 @@ my @BUILD_BASIC = qw(Compression FFT IO/Misc IO/Pnm ImageND ImageRGB);
WriteMakefile(
NAME => 'PDL',
VERSION_FROM => 'lib/PDL/Core.pm',
MIN_PERL_VERSION => '5.014',
EXE_FILES => \@exe_files,
XSMULTI => 1,
XSBUILD => {
Expand Down
8 changes: 3 additions & 5 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ eval { require Devel::CheckLib; Devel::CheckLib->import; };
use 5.014;
use ExtUtils::MakeMaker;
use ExtUtils::MakeMaker::Config;
use File::Spec;
use File::Spec::Functions qw(rel2abs catdir);

# this will make PDL::Core::Dev's functions available
# in Makefile.PL files in all subdirectories
require "./Basic/lib/PDL/Core/Dev.pm"; PDL::Core::Dev->import();
$INC{'PDL/Core/Dev.pm'} = 1; # so require P:C:Dev will report success after
use lib rel2abs catdir qw(Basic lib);
use PDL::Core::Dev;

my @cpan_deps = my @prereq = (
'Data::Dumper' => 2.121, # for PDL::IO::Dumper
Expand Down

0 comments on commit 094dd3b

Please sign in to comment.