1 ## --Makefile.PL for Bioperl core module distribution--##
2 ## ----------------------------------------------------##
4 ##----------------------------------------------------
6 # This still works, but has been superceded by Build.PL
7 # Please use Build.PL in preference
11 Bioperl is transitioning from Makefile.PL-based installations to Build.PL
13 This Makefile.PL should still work fine, but please try Build.PL instead,
14 especially if you run into any non-test-related problems:
20 If you're seeing this message whilst installing with CPAN, consider
21 stopping this installation and changing your CPAN configuration before
22 trying to install again:
26 cpan>install Module::Build
27 cpan>o conf prefer_installer MB
31 Otherwise, if you would like to install the optional dependencies,
32 install Bundle::BioPerl v2.1.8 or greater
47 # Start with object preamble and setup of variables that might need changing
54 use File::Spec::Functions;
55 use ExtUtils::MakeMaker;
58 my $VERSION = 1.005002_100;
59 $VERSION = eval $VERSION;
61 # All Bioperl dependencies on external modules are defined here
62 # (these are mostly considered optional)
64 'DBI' => '0.0/Database Access/basic functionality/Everything',
65 'Bio::Root::Version' => '1.005002/Bioperl/basic functionality/Everything',
68 # We don't want CPAN, Bundle::BioPerl et al. to know about these for various
69 # reasons (eg. because they would cause a circular dependency), so will exclude
70 # them from PREREQ_PM later on
71 my %exclude_from_prereqs = (
75 # These are really required and deserve a clearer warning
77 'Bio::Root::Version' => 1,
86 # generate string for makefile that allows show_tests and make test_<testname>
88 opendir(DIR,"t") || die "No test directory. Cannot continue.";
89 my @files = readdir(DIR);
93 foreach my $file (@files) {
94 $file =~ /(\w+)\.t/ || next;
96 my $path = catfile('t', $file);
97 my $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;\' $path.t\n";
99 $tset .= " $file \\\n";
101 $tline = "show_tests :\n\t\@echo \'type make test_<subtest> to run\'\n\t\@echo '$tset'\n$tline\n";
102 print STDERR "Generated sub tests. go make show_tests to see available subtests\n";
104 # we may end up creating extra files we would want to clean later; note them here
105 my @should_be_cleaned;
107 # ask questions about optional stuff to install/test
110 # notify about optional modules that haven't been installed, and generate hash
111 # for prereqs needed later in WriteMakefile
114 print "\n*** Optional dependencies section ***\n";
115 while (my ($name, $value) = each %packages) {
116 my ($ver, $desc, $expl, $module) = split( /\// , $value);
118 if (! eval "require $name;" || (${$name.'::VERSION'} || 0) < $ver) {
119 my @modules = split(',', $module);
120 my $modules = join("\n * ", @modules);
121 print "External Module '$name' >= $ver ($desc) is not installed on this computer.\n The following Bioperl-run modules need it for $expl:\n * $modules\n";
124 if (exists $exclude_from_prereqs{$name}) {
125 print "Additionally, it will not be considered a pre-requisite\n(and therefore will not be automatically installed by CPAN) because:\n $exclude_from_prereqs{$name}.\n\n";
127 elsif (exists $required{$name}) {
128 print "Additionally, it is absolutely required and therefore most if not all tests will fail!\n\n";
135 unless (exists $exclude_from_prereqs{$name}) {
136 $prereq{$name} = $ver;
143 Some perl modules are missing, listed above and below. The only
144 functionality that will be affected is described above;
145 the rest of bioperl will work fine without them.
147 The installation of these external packages is very simple. You
148 can read more about bioperl external dependencies in the INSTALL
151 http://bioperl.org/wiki/Installing_BioPerl
153 Enjoy the rest of bioperl, which you can use after going 'make install'
158 print "All dependencies are installed\n\n";
160 print "NB: BioSQL also needs to be installed for this package to work; see the INSTALL file\n\n";
165 DISTNAME => 'bioperl-db',
167 dist => { COMPRESS => 'gzip -9f',
169 DIST_DEFAULT => 'all tardist'
171 'AUTHOR' => 'Bioperl Team (bioperl-l@bioperl.org)',
172 'ABSTRACT' => 'bioperl-db - package for biological databases',
173 # clean() is overridden and also gets rid of @should_be_cleaned
174 realclean => { FILES => join(' ', @should_be_cleaned) },
175 PREREQ_PM => \%prereq,
176 # Once 'nmake ppd' has been issued, the PPD needs to be modified for use with PPM4
177 # In addition, non-critical prereq's should be moved to a Bundle::BioPerl PPD
178 # A bit of a pain, but better to have all the prereq's in the same place initially
179 # TODO I'll (Nathan Haigh) added updated details to the wiki for doing this
191 # override MakeMaker methods
201 return shift->SUPER::clean(@_) . <<END;
202 \t-rm -rf @should_be_cleaned