Basic OO functions for perl lib
[blerg.git] / lib / perl / Blerg-Database / Makefile.PL
1 use 5.008000;
2 use ExtUtils::MakeMaker;
3 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
4 # the contents of the Makefile that is written.
5 WriteMakefile(
6     NAME              => 'Blerg::Database',
7     VERSION_FROM      => 'lib/Blerg/Database.pm', # finds $VERSION
8     PREREQ_PM         => {}, # e.g., Module::Name => 1.1
9     ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
10       (ABSTRACT_FROM  => 'lib/Blerg/Database.pm', # retrieve abstract from module
11        AUTHOR         => 'Chip Black <bytex64@bytex64.net>') : ()),
12     LIBS              => [''], # e.g., '-lm'
13     OBJECT            => '$(BASEEXT)$(OBJ_EXT) ../../../blerg.a',
14     DEFINE            => '', # e.g., '-DHAVE_SOMETHING'
15     INC               => '-I../../..', # e.g., '-I. -I/usr/include/other'
16         # Un-comment this if you add C files to link with later:
17     # OBJECT            => '$(O_FILES)', # link all the C files too
18 );
19 if  (eval {require ExtUtils::Constant; 1}) {
20   # If you edit these definitions to change the constants used by this module,
21   # you will need to use the generated const-c.inc and const-xs.inc
22   # files to replace their "fallback" counterparts before distributing your
23   # changes.
24   my @names = (qw());
25   ExtUtils::Constant::WriteConstants(
26                                      NAME         => 'Blerg::Database',
27                                      NAMES        => \@names,
28                                      DEFAULT_TYPE => 'IV',
29                                      C_FILE       => 'const-c.inc',
30                                      XS_FILE      => 'const-xs.inc',
31                                   );
32
33 }
34 else {
35   use File::Copy;
36   use File::Spec;
37   foreach my $file ('const-c.inc', 'const-xs.inc') {
38     my $fallback = File::Spec->catfile('fallback', $file);
39     copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
40   }
41 }