summaryrefslogtreecommitdiff
path: root/perl/Makefile.PL
blob: ac83f72c7ade3c1bc351318b0d0e584d4a5db6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use inc::Module::Install;
name 'Data-MessagePack';
all_from 'lib/Data/MessagePack.pm';
readme_from 'lib/Data/MessagePack.pm';

perl_version '5.008005';
license 'perl';
can_cc or die "This module requires a C compiler";

tests 't/*.t';
author_tests('xt');
use_ppport 3.19;

clean_files qw{
    *.stackdump
    *.gcov *.gcda *.gcno
    *.out
    nytprof
    cover_db
};

if ($ENV{DEBUG}) {
    cc_append_to_ccflags '-g';
}

# copy modules
if ($Module::Install::AUTHOR && -d File::Spec->catfile('..', 'msgpack')) {
    mkdir 'msgpack' unless -d 'msgpack';
    require File::Copy;
    for my $src (<../msgpack/*.h>) {
        File::Copy::copy($src, 'msgpack/') or die "copy failed: $!";
    }
}

auto_set_repository;
build_requires 'Test::More';
use_test_base;
auto_include;
WriteAll;