Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Undo last two commits - breaks builds on some other systems.
(Will track down with a branch)
  • Loading branch information
Craig DeForest committed Apr 9, 2015
1 parent b4ef547 commit babaa0e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 33 deletions.
55 changes: 25 additions & 30 deletions Basic/Core/Dev.pm
Expand Up @@ -105,7 +105,7 @@ sub whereami {
}

sub whereami_inst {
for $dir (@INC,map {$_."/blib"} qw|. .. ../.. ../../.. ../../../..|) {
for $dir (@INC,map {$_."/blib"} qw|. .. ../.. ../../.. ../../../..|) {
return ($_[0] ? $dir . '/PDL' : $dir)
if -e "$dir/PDL/Core/Dev.pm";
}
Expand Down Expand Up @@ -379,31 +379,29 @@ EOF
# This is the function internal for PDL.

sub pdlpp_postamble_int {
join '',map {
my($src,$pref,$mod, $deps) = @$_;
die "If give dependencies, must be array-ref" if $deps and !ref $deps;
my $w = whereami_any();
$w =~ s%/((PDL)|(Basic))$%%; # remove the trailing subdir
my $top = File::Spec->abs2rel($w);
my $basic = File::Spec->catdir($top, 'Basic');
my $core = File::Spec->catdir($basic, 'Core');
my $gen = File::Spec->catdir($basic, 'Gen');
my $depbuild = '';
for my $dep (@{$deps || []}) {
my $target = '';
if ($dep eq 'core') {
$dep = $top;
$target = ' core';
}
require ExtUtils::MM;
$dep =~ s#([\(\)])#\\$1#g; # in case of unbalanced (
$depbuild .= MM->oneliner("exit(!(chdir q($dep) && !system(q(\$(MAKE)$target))))");
$depbuild .= "\n\t";
}

join '',map { my($src,$pref,$mod, $deps) = @$_;
die "If give dependencies, must be array-ref" if $deps and !ref $deps;
my $w = whereami_any();
$w =~ s%/((PDL)|(Basic))$%%; # remove the trailing subdir
my $top = File::Spec->abs2rel($w);
my $basic = File::Spec->catdir($top, 'Basic');
my $core = File::Spec->catdir($basic, 'Core');
my $gen = File::Spec->catdir($basic, 'Gen');
my $depbuild = '';
for my $dep (@{$deps || []}) {
my $target = '';
if ($dep eq 'core') {
$dep = $top;
$target = ' core';
}
require ExtUtils::MM;
$dep =~ s#([\(\)])#\\$1#g; # in case of unbalanced (
$depbuild .= MM->oneliner("exit(!(chdir q($dep) && !system(q(\$(MAKE)$target))))");
$depbuild .= "\n\t";
}
qq|
$pref.pm: $src $core/Types.pm
$pref.pm: $src $core/Types.pm
$depbuild\$(PERLRUNINST) \"-MPDL::PP qw/$mod $mod $pref/\" $src
$pref.xs: $pref.pm
Expand All @@ -413,9 +411,7 @@ $pref.c: $pref.xs
$pref\$(OBJ_EXT): $pref.c
|
}

(@_);
} (@_)
}


Expand All @@ -442,13 +438,12 @@ $pref\$(OBJ_EXT): $pref.c
sub pdlpp_stdargs_int {
my($rec) = @_;
my($src,$pref,$mod) = @$rec;
my $w = whereami_any();
my $w = whereami();
my $malloclib = exists $PDL::Config{MALLOCDBG}->{libs} ?
$PDL::Config{MALLOCDBG}->{libs} : '';
my $mallocinc = exists $PDL::Config{MALLOCDBG}->{include} ?
$PDL::Config{MALLOCDBG}->{include} : '';
my $libsarg = $libs || $malloclib ? "$libs $malloclib " : ''; # for Win32
eval 'use ExtUtils::MakeMaker;'; # ensure VERSION is loaded
my $libsarg = $libs || $malloclib ? "$libs $malloclib " : ''; # for Win32
return (
%::PDL_OPTIONS,
'NAME' => $mod,
Expand Down
5 changes: 2 additions & 3 deletions Basic/Gen/Inline/Pdlpp.pm
Expand Up @@ -29,9 +29,8 @@ sub validate {
my $o = shift;
$o->{ILSM} ||= {};
$o->{ILSM}{XS} ||= {};
# Internal should never be on during Inline compilations -- causes problems
# with "Basic/" vs "PDL/" suffixes in the library string later.
$o->{ILSM}{INTERNAL} = 0 unless defined $o->{ILSM}{INTERNAL};
# having internal on shouldn't matter
$o->{ILSM}{INTERNAL} = 1 unless defined $o->{ILSM}{INTERNAL};
$o->{ILSM}{MAKEFILE} ||= {};
if (not $o->UNTAINT) {
my $w = abs_path(PDL::Core::Dev::whereami_any());
Expand Down

0 comments on commit babaa0e

Please sign in to comment.