From 333c89c054c403b0d6f498141720987e66107633 Mon Sep 17 00:00:00 2001 From: Ed J Date: Sat, 4 Jan 2025 19:58:24 +0000 Subject: [PATCH] submodules use lib/PDL/LinearAlgebra.pm for VERSION - PAUSE descending version --- Complex/Makefile.PL | 2 +- Complex/complex.pd | 10 ++++++---- Real/Makefile.PL | 2 +- Real/real.pd | 12 ++++++------ Trans/Makefile.PL | 2 +- Trans/trans.pd | 9 ++++++--- 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Complex/Makefile.PL b/Complex/Makefile.PL index 1aca2da..3662999 100755 --- a/Complex/Makefile.PL +++ b/Complex/Makefile.PL @@ -13,7 +13,7 @@ $hash{INC} .= " $inc"; WriteMakefile( %hash, %ldloadlibs, - VERSION_FROM => $file, + VERSION_FROM => '../lib/PDL/LinearAlgebra.pm', NO_MYMETA => 1, ); diff --git a/Complex/complex.pd b/Complex/complex.pd index d5db9cb..a5dfea5 100644 --- a/Complex/complex.pd +++ b/Complex/complex.pd @@ -1,9 +1,11 @@ do('../Config'); -our $VERSION = '0.14'; -pp_setversion($VERSION); -$VERSION = eval $VERSION; -use PDL::Exporter; +{ # required because PAUSE will reject undefined $VERSION +require ExtUtils::MM; +my $MM = bless { NAME => 'Fake' }, 'MM'; +my $global_version = $MM->parse_version('../lib/PDL/LinearAlgebra.pm'); +pp_setversion($global_version); +} if ($config{CBLAS}){ pp_addhdr('#include '); diff --git a/Real/Makefile.PL b/Real/Makefile.PL index fc0b648..d47782d 100755 --- a/Real/Makefile.PL +++ b/Real/Makefile.PL @@ -13,7 +13,7 @@ $hash{INC} .= " $inc"; WriteMakefile( %hash, %ldloadlibs, - VERSION_FROM => $file, + VERSION_FROM => '../lib/PDL/LinearAlgebra.pm', NO_MYMETA => 1, ); diff --git a/Real/real.pd b/Real/real.pd index 24c6a97..3d284a2 100644 --- a/Real/real.pd +++ b/Real/real.pd @@ -1,11 +1,11 @@ do('../Config'); -our $VERSION = '0.14'; -pp_setversion($VERSION); -$VERSION = eval $VERSION; - -use PDL::Exporter; -use PDL::Types qw(ppdefs_all); +{ # required because PAUSE will reject undefined $VERSION +require ExtUtils::MM; +my $MM = bless { NAME => 'Fake' }, 'MM'; +my $global_version = $MM->parse_version('../lib/PDL/LinearAlgebra.pm'); +pp_setversion($global_version); +} sub generate_code($){ if ($config{WITHOUT_THREAD}){ diff --git a/Trans/Makefile.PL b/Trans/Makefile.PL index ab785d4..18baed6 100644 --- a/Trans/Makefile.PL +++ b/Trans/Makefile.PL @@ -13,7 +13,7 @@ $hash{INC} .= " $inc"; WriteMakefile( %hash, %ldloadlibs, - VERSION_FROM => $file, + VERSION_FROM => '../lib/PDL/LinearAlgebra.pm', NO_MYMETA => 1, ); diff --git a/Trans/trans.pd b/Trans/trans.pd index af52c61..bd526c1 100644 --- a/Trans/trans.pd +++ b/Trans/trans.pd @@ -1,6 +1,9 @@ -our $VERSION = '0.14'; -pp_setversion($VERSION); -$VERSION = eval $VERSION; +{ # required because PAUSE will reject undefined $VERSION +require ExtUtils::MM; +my $MM = bless { NAME => 'Fake' }, 'MM'; +my $global_version = $MM->parse_version('../lib/PDL/LinearAlgebra.pm'); +pp_setversion($global_version); +} if ($^O =~ /MSWin/) { pp_addhdr('