synopsis doc
[bioperl-run.git] / Makefile.PL
blob03c06e880981fa01f92d8a6255e53f6358858049
1 ## --Makefile.PL for Bioperl-pipeline distribution--##
2 ## ----------------------------------------------------##
3 ## $Id$
4 ##----------------------------------------------------
7 # Basically this is a standard Makefile with a hash of
8 # needed packages which are tested at the start
10 # If you want help with this Makefile get in touch with
11 # the developers by sending a message to bioperl-l@bioperl.org.
12 require 5.005;
13 use ExtUtils::MakeMaker;
17 # All Bioperl dependencies on external modules are defined here
18 %packages = (
19              'IO::String'               => '0.0/IO handle to read or write to a string/GenBank+GenPept sequence retrieval, Variation code/Bio::DB::*,Bio::Variation::*,Bio::Tools::Blast::Run::Webblast, Bio::Index::Blast',
20              'File::Temp'               => '0.0/Temporary File creation/Bio::Root::IO uses if present/Bio::DB::WebDBSeqI, Bio::Seq::LargePrimarySeq',
21              'XML::Parser::PerlSAX'          => '0.0/XML SAX parser/Pise Applications/Pise::Job');
23 sub check_package {
24     my ($name,$str) = @_;
25     my ($ver,$desc,$expl,$module) = split( /\// , $str);
26     if( !eval "require($name)") {
27         print "External Module $name, $desc,\n is not installed on this computer.\n  The $module in bioperl-run  needs it for $expl\n\n";
28         return 1;
29     }
31     return 0;
35 # Generate sub testing package system
39 # make mini test targets for playing around with
40 # in testing...
42 opendir(DIR,"t") || warn "No test directory. Weird!";
43 @files = readdir(DIR);
44 shift @files;
45 shift @files;
46 foreach my $file (@files) {
47     $file =~ /(\w+)\.t/ || next;
48     $file = $1;
49     $line = "test_$file :: pure_all\n\tPERL_DL_NONLAZY=1 \$(FULLPERL) -I\$(INST_ARCHLIB) -I\$(INST_LIB) -I\$(PERL_ARCHLIB) -I\$(PERL_LIB) -e \'use Test::Harness qw(&runtests \$\$verbose); \$\$verbose=\$(TEST_VERBOSE); runtests \@ARGV;\' t/$file.t\n";
50     push(@tline,$line);
51     push(@targets,$file);
52     $tset  .= "$file \\\n";
55 $tline = join('',@tline);
56 $tline = "show_tests :\n\t\@echo \'type make test_<subtest> to run\'\n\t\@echo '$tset'\n$tline\n";
58 print STDERR "Generated sub tests. go make show_tests to see available subtests\n";
60 sub MY::postamble {
61              $tline;
65 # Talk to Elia Stupka (<elia@fugu-sg.org>) or bioperl-l@bioperl.org for more info.
68 # Let the code begin...
70 my $NAME     = 'Bio';
71 my $DISTNAME = "bioperl-run";
72 my $VERSION  = "1.00";
74 my $proceed = prompt("Do you want to run the Pise tests (requires a network connection) y/n",'n');
75 if( $proceed =~ /^[yY]/) {
76     my $address = prompt("Enter your email address (no default)",'');
77    
78     if (open T,">t/pise-email.test") {
79 print T "$address\n";
80 close T;
81     } else { warn("Cannot open file t/pise-email.test for writing - no Pise tests will be run"); }
82 } else {
83     if( -e "t/pise-email.test" ) {
84 unlink "t/pise-email.test";
85     }
87 #$do_autoload_finesse = 0;
88 #$NAME     = 'Bio';
89 #$DISTNAME = "GFD";
90 #$VERSION  = "1.00";
92 $error = 0;
93 print "\n";
94 foreach $name ( keys %packages ) {
95     if( &check_package($name,$packages{$name}) == 1 ) {
96         $error = 1;
97     }
100 if( $error == 1 ) {
101     print <<QQ_ERROR_QQ;
103 Warning:
105    There are some external packages and perl modules, listed above, which 
106    bioperl-run uses. This only effects the functionality which is listed above:
107 the rest of bioperl will work fine.
109    The installation of these external packages is very simple. You
110    can read more about bioperl external dependencies at
112    http://bioperl.org/Core/external.shtml
114    Enjoy the rest of bioperl, which you can use after going 'make install'
116 QQ_ERROR_QQ
119 WriteMakefile(
120     NAME        => $NAME,
121     DISTNAME    => $DISTNAME,
122     VERSION     => $VERSION,
123     'dist'      => {  COMPRESS     => 'gzip -9f',
124                       SUFFIX       => '.gz', 
125                       DIST_DEFAULT => 'all tardist',
126                    },
127     ($] ge '5.005')  ? (
128         'AUTHOR' => 'FuguI Team (fugui@fugu-sg.org)',
129         'ABSTRACT' => 'Generic Feature Database',
130         ) : (),
131      'realclean'  => {  FILES        => join(' ',@BACKUP_FILES) }