Skip to content

Commit

Permalink
switch to lib/*.pd scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Jan 4, 2025
1 parent 333c89c commit 6ab5286
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 114 deletions.
31 changes: 12 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
Complex/Complex.bs
Complex/Complex.c
Complex/Complex.o*
Complex/selectfunc.o*
Complex/Complex.pm
Complex/Complex.xs
Real/Real.bs
Real/Real.c
Real/Real.o*
Real/selectfunc.o*
Real/Real.pm
Real/Real.xs
Trans/Trans.bs
Trans/Trans.c
Trans/Trans.o*
Trans/selectfunc.o*
Trans/Trans.pm
Trans/Trans.xs
*/pp-*.[co]*
lib/PDL/LinearAlgebra/Complex.c
lib/PDL/LinearAlgebra/Complex.pm
lib/PDL/LinearAlgebra/Complex.xs
lib/PDL/LinearAlgebra/Real.c
lib/PDL/LinearAlgebra/Real.pm
lib/PDL/LinearAlgebra/Real.xs
lib/PDL/LinearAlgebra/Trans.c
lib/PDL/LinearAlgebra/Trans.pm
lib/PDL/LinearAlgebra/Trans.xs
**/*-pp-*.c
**/*.o*
**/*.bs
**/*.gcda
**/*.gcno
**/*.gcov
Expand Down
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- uses PDL 2.096+ lib/*.pd format for quicker builds

0.431 2025-01-03
- mschur test with complex data can give different on 32-bit (#29) - thanks @sebastic for report

Expand Down
22 changes: 0 additions & 22 deletions Complex/Makefile.PL

This file was deleted.

15 changes: 6 additions & 9 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
Artistic_2
Changes
Complex/complex.pd
Complex/Makefile.PL
Complex/selectfunc.c
Config
lib/PDL/LinearAlgebra.pm
lib/PDL/LinearAlgebra/Complex-selectfunc.c
lib/PDL/LinearAlgebra/Complex.pd
lib/PDL/LinearAlgebra/Real-selectfunc.c
lib/PDL/LinearAlgebra/Real.pd
lib/PDL/LinearAlgebra/Special.pm
lib/PDL/LinearAlgebra/Trans-selectfunc.c
lib/PDL/LinearAlgebra/Trans.pd
Makefile.PL
MANIFEST This list of files
pp_defc.pl
README
Real/Makefile.PL
Real/real.pd
Real/selectfunc.c
t/1.t
t/cgtsv.t
t/common.pl
t/gtsv.t
Trans/Makefile.PL
Trans/selectfunc.c
Trans/trans.pd
9 changes: 5 additions & 4 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/pp-.*
Real/Real\.
Trans/Trans\.
Complex/Complex\.
/[^/]*pp-.*
lib/PDL/LinearAlgebra/Complex\.(c|xs|pm)$
lib/PDL/LinearAlgebra/Real\.(c|xs|pm)$
lib/PDL/LinearAlgebra/Trans\.(c|xs|pm)$
cover_db/
Makefile(\.old)?$
\.o(bj|)$
\.bs$
\.sw.*$
META
MANIFEST\.SKIP
Expand Down
32 changes: 23 additions & 9 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ EOF
);
}
my $preop = '$(PERLRUNINST) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)';
my $package_name = "PDL::LinearAlgebra";
(my $repo = $package_name) =~ s#::#-#g;
$repo = "PDLPorters/$repo";
WriteMakefile(
NAME => 'PDL::LinearAlgebra',
ABSTRACT => 'PDL bindings to some BLAS and LAPACK library routines',
Expand All @@ -54,31 +58,32 @@ WriteMakefile(
"meta-spec" => { version => 2 },
resources => {
homepage => 'http://pdl.perl.org/',
bugtracker => {web=>"https://github.com/$repo/issues"},
repository => {
url => 'git://github.com/PDLPorters/pdl-linearalgebra.git',
url => "git://github.com/$repo.git",
type => 'git',
web => 'https://github.com/PDLPorters/pdl-linearalgebra',
web => "https://github.com/$repo",
},
bugtracker => {web=>'https://github.com/PDLPorters/pdl-linearalgebra/issues'},
x_IRC => 'irc://irc.perl.org/#pdl',
},
x_IRC => 'irc://irc.perl.org/#pdl',
},
CONFIGURE_REQUIRES => {
"PDL" => '2.091',
"PDL" => '2.096',
"Devel::CheckLib" => 0,
"ExtUtils::F77" => '1.26',
},
PREREQ_PM => {
"PDL" => '2.091', # tricpy etc
"PDL" => '2.096', # lib/*.pd
},
TEST_REQUIRES => {
"Test::More" => '0.88', # done_testing
},
dist => { PREOP=>'$(PERL) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' }, # GENERATED subdir in dist tarball
INC => $inc,
LIBS => [$libs0],
dist => { COMPRESS => 'gzip', SUFFIX => 'gz', PREOP => $preop },
clean => { FILES => '*~' },
);
sub find_libs {
return if $^O !~ /linux/i;
# in performance order based on libraries I've used
Expand Down Expand Up @@ -107,7 +112,16 @@ sub find_macos_libs {
qq{-L"$pref/lib" -llapack -lblas};
}
my @pd_srcs;
sub MY::init_PM {
package MY; # so that "SUPER" works right
my ($self) = @_;
$self->SUPER::init_PM;
delete $self->{PM}{'pp_defc.pl'};
@pd_srcs = ::pdlpp_eumm_update_deep($self);
}
sub MY::postamble {
my $oneliner = PDL::Core::Dev::_oneliner(qq{exit if \$ENV{DESTDIR}; use PDL::Doc; eval { PDL::Doc::add_module(shift); }});
qq|\ninstall :: pure_install\n\t$oneliner \$(NAME)\n|;
pdlpp_postamble(@pd_srcs) .
qq|\ninstall :: pure_install\n\t$oneliner \$(NAME)\n|;
}
22 changes: 0 additions & 22 deletions Real/Makefile.PL

This file was deleted.

22 changes: 0 additions & 22 deletions Trans/Makefile.PL

This file was deleted.

File renamed without changes.
10 changes: 7 additions & 3 deletions Complex/complex.pd → lib/PDL/LinearAlgebra/Complex.pd
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
do('../Config');
do('./Config');

{ # 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');
my $global_version = $MM->parse_version('lib/PDL/LinearAlgebra.pm');
pp_setversion($global_version);
}

{ no warnings 'once'; # pass info back to Makefile.PL
$PDL::Core::Dev::EXTRAS{$::PDLMOD}{OBJECT} .= join '', map " $::PDLBASE-$_\$(OBJ_EXT)", qw(selectfunc);
}

if ($config{CBLAS}){
pp_addhdr('#include <cblas.h>');
}
Expand Down Expand Up @@ -76,7 +80,7 @@ sub generate_code($){
}
}

do '../pp_defc.pl'; die if $@;
do './pp_defc.pl'; die if $@;

pp_addpm({At=>'Top'},<<'EOD');
use strict;
Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions Real/real.pd → lib/PDL/LinearAlgebra/Real.pd
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
do('../Config');
do('./Config');

{ # 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');
my $global_version = $MM->parse_version('lib/PDL/LinearAlgebra.pm');
pp_setversion($global_version);
}

{ no warnings 'once'; # pass info back to Makefile.PL
$PDL::Core::Dev::EXTRAS{$::PDLMOD}{OBJECT} .= join '', map " $::PDLBASE-$_\$(OBJ_EXT)", qw(selectfunc);
}

sub generate_code($){
if ($config{WITHOUT_THREAD}){
return '
Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions Trans/trans.pd → lib/PDL/LinearAlgebra/Trans.pd
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{ # 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');
my $global_version = $MM->parse_version('lib/PDL/LinearAlgebra.pm');
pp_setversion($global_version);
}

{ no warnings 'once'; # pass info back to Makefile.PL
$PDL::Core::Dev::EXTRAS{$::PDLMOD}{OBJECT} .= join '', map " $::PDLBASE-$_\$(OBJ_EXT)", qw(selectfunc);
}

if ($^O =~ /MSWin/) {
pp_addhdr('
#include <float.h>
Expand Down Expand Up @@ -347,7 +351,7 @@ ACM - Transactions On Mathematical Software, 24(1):130-156, 1998
EOT
);

do '../pp_defc.pl'; die if $@;
do './pp_defc.pl'; die if $@;
pp_defc('geexp',
Pars => '[io]A(2,n,n);int deg();scale();int trace();int [o]ns();int [o]info(); int [t] ipiv(n)',
Doc => '
Expand Down

0 comments on commit 6ab5286

Please sign in to comment.