meta files for LBVXS
[language-befunge-vector-xs.git] / Makefile.PL
blob845f2a2b8991f8ab7910576076fabb243b03c839
1 use 5.008008;
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              => 'Language::Befunge::Vector::XS',
7     VERSION_FROM      => 'lib/Language/Befunge/Vector/XS.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/Language/Befunge/Vector/XS.pm', # retrieve abstract from module
11        AUTHOR         => 'Jerome Quelin <jquelin@gmail.com>') : ()),
12     LIBS              => [''], # e.g., '-lm'
13     DEFINE            => '', # e.g., '-DHAVE_SOMETHING'
14     INC               => '-I.', # e.g., '-I. -I/usr/include/other'
15     clean             => { FILES => [
16              'Language-Befunge-Vector-XS-*',
17               map { ( '*/' x $_ ) . '*~' } 0..4 ]
18     },
20         # Un-comment this if you add C files to link with later:
21     # OBJECT            => '$(O_FILES)', # link all the C files too
23 if  (eval {require ExtUtils::Constant; 1}) {
24   # If you edit these definitions to change the constants used by this module,
25   # you will need to use the generated const-c.inc and const-xs.inc
26   # files to replace their "fallback" counterparts before distributing your
27   # changes.
28   my @names = (qw());
29   ExtUtils::Constant::WriteConstants(
30                                      NAME         => 'Language::Befunge::Vector::XS',
31                                      NAMES        => \@names,
32                                      DEFAULT_TYPE => 'IV',
33                                      C_FILE       => 'const-c.inc',
34                                      XS_FILE      => 'const-xs.inc',
35                                   );
38 else {
39   use File::Copy;
40   use File::Spec;
41   foreach my $file ('const-c.inc', 'const-xs.inc') {
42     my $fallback = File::Spec->catfile('fallback', $file);
43     copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
44   }