"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Basic/Core/Dev.pm" between
PDL-2.074.tar.gz and PDL-2.075.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

Dev.pm  (PDL-2.074):Dev.pm  (PDL-2.075)
skipping to change at line 160 skipping to change at line 160
# The idea is to support in future several packages in same dir - EUMM # The idea is to support in future several packages in same dir - EUMM
# 7.06 supports # 7.06 supports
sub _pp_call_arg { sub _pp_call_arg {
"-MPDL::PP=".join ',', @_ "-MPDL::PP=".join ',', @_
} }
sub _postamble { sub _postamble {
my ($w, $internal, $src, $pref, $mod, $callpack, $multi_c) = @_; my ($w, $internal, $src, $pref, $mod, $callpack, $multi_c) = @_;
$callpack //= ''; $callpack //= '';
$w = dirname($w); $w = dirname($w);
my ($perlrun, $pmdep, $install, $cdep) = ($internal ? '$(PERLRUNINST)' : "\$(P my $perlrun = $internal ? '$(PERLRUNINST)' : "\$(PERL) \"-I$w\"";
ERL) \"-I$w\"", $src, '', ''); my ($pmdep, $install, $cdep) = ($src, '', '');
my @cbase = $multi_c ? map "pp-$_", _pp_list_functions($src, $internal) : ();
my @objs = map "$_\$(OBJ_EXT)", $pref, @cbase;
if ($internal) { if ($internal) {
require File::Spec::Functions; require File::Spec::Functions;
my $top = File::Spec::Functions::abs2rel($w); my $top = File::Spec::Functions::abs2rel($w);
my $core = File::Spec::Functions::catdir($top, qw(Basic Core)); my $core = File::Spec::Functions::catdir($top, qw(Basic Core));
$pmdep .= join ' ', '', $pmdep .= join ' ', '',
File::Spec::Functions::catfile($top, qw(Basic Gen pm_to_blib)), File::Spec::Functions::catfile($top, qw(Basic Gen pm_to_blib)),
File::Spec::Functions::catfile($core, qw(pm_to_blib)), File::Spec::Functions::catfile($core, qw(pm_to_blib)),
; ;
$cdep .= join ' ', map File::Spec::Functions::catfile($core, $_), $cdep .= join ' ', @objs, ':', map File::Spec::Functions::catfile($core, $_)
qw(pdl.h pdlcore.h pdlthread.h pdlmagic.h); ,
qw(pdl.h pdlcore.h pdlbroadcast.h pdlmagic.h);
} else { } else {
my $oneliner = _oneliner(qq{exit if \$ENV{DESTDIR}; use PDL::Doc; eval { PDL ::Doc::add_module(q{$mod}); }}); my $oneliner = _oneliner(qq{exit if \$ENV{DESTDIR}; use PDL::Doc; eval { PDL ::Doc::add_module(q{$mod}); }});
$install = qq|\ninstall ::\n\t\@echo "Updating PDL documentation database... ";\n\t$oneliner\n|; $install = qq|\ninstall ::\n\t\@echo "Updating PDL documentation database... ";\n\t$oneliner\n|;
} }
my @generanda = "$pref.xs"; my @generanda = ("$pref.xs", map "$_.c", @cbase);
my @cbase = $multi_c ? map "pp-$_", _pp_list_functions($src, $internal) : ();
push @generanda, map "$_.c", @cbase;
my @objs = map "$_\$(OBJ_EXT)", $pref, @cbase;
my $pp_call_arg = _pp_call_arg($mod, $mod, $pref, $callpack, $multi_c||''); my $pp_call_arg = _pp_call_arg($mod, $mod, $pref, $callpack, $multi_c||'');
qq| qq|
$pref.pm : $pmdep $pref.pm : $pmdep
$perlrun \"$pp_call_arg\" $src $perlrun \"$pp_call_arg\" $src
\$(TOUCH) $pref.pm \$(TOUCH) $pref.pm
@generanda : $pref.pm @generanda : $pref.pm
\$(NOECHO) \$(NOOP) \$(NOECHO) \$(NOOP)
@objs : $cdep $cdep
$install| $install|
} }
sub pdlpp_postamble_int { sub pdlpp_postamble_int {
my $w = whereami_any(); my $w = whereami_any();
join '', map _postamble($w, 1, @$_[0..3], 1), @_; join '', map _postamble($w, 1, @$_[0..3], 1), @_;
} }
# This is the function to be used outside the PDL tree. # This is the function to be used outside the PDL tree.
# same format as pdlpp_postamble_int # same format as pdlpp_postamble_int
skipping to change at line 293 skipping to change at line 293
my $basefile = "$basename.pm"; my $basefile = "$basename.pm";
my $outfile = File::Spec::Functions::rel2abs("$dir/GENERATED/$prefix.pm"); my $outfile = File::Spec::Functions::rel2abs("$dir/GENERATED/$prefix.pm");
File::Path::mkpath(dirname($outfile)); File::Path::mkpath(dirname($outfile));
my $old_cwd = Cwd::cwd(); my $old_cwd = Cwd::cwd();
chdir dirname($pd); chdir dirname($pd);
#there is no way to use PDL::PP from perl code, thus calling via system() #there is no way to use PDL::PP from perl code, thus calling via system()
my $pp_call_arg = _pp_call_arg($mod, $mod, $basename, '', 1); my $pp_call_arg = _pp_call_arg($mod, $mod, $basename, '', 1);
my $rv = system($^X, @in, $pp_call_arg, File::Spec::Functions::abs2rel(basen ame($pd))); my $rv = system($^X, @in, $pp_call_arg, File::Spec::Functions::abs2rel(basen ame($pd)));
die "pdlpp_mkgen: cannot convert '$pd'\n" unless $rv == 0 && -f $basefile; die "pdlpp_mkgen: cannot convert '$pd'\n" unless $rv == 0 && -f $basefile;
File::Copy::copy($basefile, $outfile) or die "$outfile: $!"; File::Copy::copy($basefile, $outfile) or die "$outfile: $!";
unlink $basefile; # Transform::Proj4.pm is wrong without GIS::Proj built
chdir $old_cwd or die "chdir $old_cwd: $!"; chdir $old_cwd or die "chdir $old_cwd: $!";
$added{"GENERATED/$prefix.pm"} = "mod=$mod pd=$pd (added by pdlpp_mkgen)"; $added{"GENERATED/$prefix.pm"} = "mod=$mod pd=$pd (added by pdlpp_mkgen)";
} }
if (scalar(keys %added) > 0) { if (scalar(keys %added) > 0) {
#maniadd works only with this global variable #maniadd works only with this global variable
local $ExtUtils::Manifest::MANIFEST = $file; local $ExtUtils::Manifest::MANIFEST = $file;
ExtUtils::Manifest::maniadd(\%added); ExtUtils::Manifest::maniadd(\%added);
} }
} }
 End of changes. 5 change blocks. 
9 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)