File: Makefile.PL

package info (click to toggle)
pdl 1%3A2.007-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,848 kB
  • ctags: 6,321
  • sloc: perl: 32,760; fortran: 13,113; ansic: 9,273; makefile: 81; sh: 32
file content (45 lines) | stat: -rw-r--r-- 1,589 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
use ExtUtils::MakeMaker;
PDL::Core::Dev->import(); # for trylink

@subdirs = qw(PGPLOT LUT IIS PLplot Limits);

# we try and build unless WITH_3D == 0
$t = $PDL::Config{WITH_3D};
if ( defined($t) and not $t ) {
   print "\n   WITH_3D:  WITH_3D => 0, not building TriD or OpenGL.  Set WITH_3D => 1 if this is incorrect.\n\n";
} elsif ( $PDL::Config{USE_POGL} ) {
   print "\n   WITH_3D:  USE_POGL => 1, will build TriD using OpenGL.\n\n";
   $PDL::Config{WITH_3D} = 1;
   unshift @subdirs,"TriD";
} else {
   print "\n   WITH_3D:  USE_POGL => 0, setting WITH_3D => 0.  Will not build TriD graphics.\n\n";
   $PDL::Config{WITH_3D}=0; # don't build TriD if no POGL
}

#WriteMakefile(
#     'NAME' => 'PDL',
#     VERSION_FROM => '../Basic/Core/Version.pm',
#     DIR => [@subdirs]
#);
my @pm_names = qw (Graphics2D.pm State.pm);

my %pm = map { $h = '$(INST_LIBDIR)/';
               $h .= 'PDL/' if $_ !~ /PDL.pm$/;
               $h .= 'Graphics/' if $_ =~ /State.pm$/;
               ( $_, $h . $_ );
             } ( @pm_names);

my %man3pods = map { $h = '$(INST_MAN3DIR)/';
                     $h .= 'PDL::' if $_ !~ /PDL.pm$/;
                     ( $_, $h . substr($_,0,length($_)-3) . '.$(MAN3EXT)' ); 
                   } @pm_names;

# Write makefile
WriteMakefile(
               'NAME'         => 'PDL',
               'VERSION_FROM' => '../Basic/Core/Version.pm',
               'PM'           => \%pm,
               'MAN3PODS'     => \%man3pods,
               'DIR'          => [@subdirs],
    (eval ($ExtUtils::MakeMaker::VERSION) >= 6.57_02 ? ('NO_MYMETA' => 1) : ()),
);