-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.PL
76 lines (64 loc) · 1.8 KB
/
Makefile.PL
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!perl
use strict;
use warnings;
BEGIN {
unshift @INC, 'inc';
# author requires, or bundled modules
my @devmods = qw(
inc::Module::Install 1.00
Module::Install::AuthorTests 0.002
Module::Install::Repository 0.06
Test::Requires 0.06
Module::Install::XSUtil 0.32
);
my @not_available;
while(my($mod, $ver) = splice @devmods, 0, 2) {
eval qq{use $mod $ver (); 1} or push @not_available, $mod;
}
if(@not_available) {
print qq{# The following modules are not available.\n};
print qq{# `perl $0 | cpanm` will install them:\n};
print $_, "\n" for @not_available;
exit 1;
}
}
use inc::Module::Install;
all_from 'lib/Plack/Handler/Nginx.pm';
use_xshelper;
cc_warnings;
cc_src_paths 'src';
my $nginx_src_path = $ARGV[0] || $ENV{NGINX_SRC_PATH} || '/tmp/nginx/';
$nginx_src_path =~ s{/$}{}g;
unless (
-d $nginx_src_path . '/src/http/' &&
-d $nginx_src_path . '/src/http/modules/' &&
-d $nginx_src_path . '/src/core/' &&
-d $nginx_src_path . '/src/event/' &&
-d $nginx_src_path . '/src/os/unix/' &&
-d $nginx_src_path . '/objs/'
) {
print "Usage: perl Makefile.PL /path/to/nginx_src_path/\n";
exit(-1);
}
cc_include_paths
$nginx_src_path . '/src/http/',
$nginx_src_path . '/src/http/modules/',
$nginx_src_path . '/src/core/',
$nginx_src_path . '/src/event/',
$nginx_src_path . '/src/os/unix/',
$nginx_src_path . '/objs/',
;
test_requires 'Test::More' => '0.88';
test_requires 'Test::Requires' => '0.06';
requires 'Plack';
auto_set_repository;
tests_recursive;
author_tests 'xt';
clean_files qw(
Plack-Handler-Nginx-*
*.stackdump
cover_db *.gcov *.gcda *.gcno
nytprof
*.out
);
WriteAll(check_nmake => 0);