let alpha be more free - don't try and restrict it
[bioperl-run.git] / Makefile.PL
blob88931be7edee68e189ae7953c20424975f2811f5
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        'Algorithm::Diff'          =>'0.0/Compute intelligent differences between two files/generating consensus protein family descriptions/TribeMCL',
20              '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',
21              'File::Temp'               => '0.0/Temporary File creation/Bio::Root::IO uses if present/Bio::DB::WebDBSeqI, Bio::Seq::LargePrimarySeq',
22              'XML::Parser::PerlSAX'          => '0.0/XML SAX parser/Pise Applications/Pise::Job',
23         'HTML::Parser'  => '0.0/HTML Parser/Pise Applications/Pise::Job');
25 sub check_package {
26     my ($name,$str) = @_;
27     my ($ver,$desc,$expl,$module) = split( /\// , $str);
28     if( !eval "require($name)") {
29         print "External Module $name, $desc,\n is not installed on this computer.\n  The $module module in bioperl-run  needs it for $expl\n\n";
30         return 1;
31     }
33     return 0;
37 # Generate sub testing package system
41 # make mini test targets for playing around with
42 # in testing...
44 opendir(DIR,"t") || warn "No test directory. Weird!";
45 @files = readdir(DIR);
46 shift @files;
47 shift @files;
48 foreach my $file (@files) {
49     $file =~ /(\w+)\.t/ || next;
50     $file = $1;
51     $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";
52     push(@tline,$line);
53     push(@targets,$file);
54     $tset  .= "$file \\\n";
57 $tline = join('',@tline);
58 $tline = "show_tests :\n\t\@echo \'type make test_<subtest> to run\'\n\t\@echo '$tset'\n$tline\n";
60 print STDERR "Generated sub tests. go make show_tests to see available subtests\n";
62 sub MY::postamble {
63              $tline;
67 # Talk to Elia Stupka (<elia@fugu-sg.org>) or bioperl-l@bioperl.org for more info.
70 # Let the code begin...
72 my $NAME     = 'Bio';
73 my $DISTNAME = "bioperl-run";
74 my $VERSION  = "1.2.2";
76 my $proceed = "n";
77 if( $proceed =~ /^[yY]/) {
78     my $address = prompt("Enter your email address (no default)",'');
79    
80     if (open T,">t/pise-email.test") {
81 print T "$address\n";
82 close T;
83     } else { warn("Cannot open file t/pise-email.test for writing - no Pise tests will be run"); }
84 } else {
85     if( -e "t/pise-email.test" ) {
86 unlink "t/pise-email.test";
87     }
89 #$do_autoload_finesse = 0;
90 #$NAME     = 'Bio';
91 #$DISTNAME = "GFD";
92 #$VERSION  = "1.00";
94 $error = 0;
95 print "\n";
96 foreach $name ( keys %packages ) {
97     if( &check_package($name,$packages{$name}) == 1 ) {
98         $error = 1;
99     }
102 if( $error == 1 ) {
103     print <<QQ_ERROR_QQ;
105 Warning:
107    There are some external packages and perl modules, listed above, which 
108    bioperl-run uses. This only effects the functionality which is listed above:
109 the rest of bioperl-run will work fine.
111    Enjoy the rest of bioperl-run, which you can use after going 'make install'
113 QQ_ERROR_QQ
116 WriteMakefile(
117     NAME        => $NAME,
118     DISTNAME    => $DISTNAME,
119     VERSION     => $VERSION,
120     'dist'      => {  COMPRESS     => 'gzip -9f',
121                       SUFFIX       => '.gz', 
122                       DIST_DEFAULT => 'all tardist',
123                    },
124     ($] ge '5.005')  ? (
125         'AUTHOR' => 'Bioperl Team (bioperl-l@bioperl.org)',
126         'ABSTRACT' => 'Bioperl wrapper toolkit',
127         ) : (),
128      'realclean'  => {  FILES        => join(' ',@BACKUP_FILES) }