forked from xslate/p5-Text-Xslate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.PL
98 lines (80 loc) · 2.62 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# for developers:
# "cpanm < author/requires.cpanm" will install all the modules required
# "make test_with_env" does all the extra tests (with pure Perl, Moose, etc.)
use strict;
use warnings;
BEGIN {
unshift @INC, 'inc';
# author requires, or bundled modules
my @devmods = qw(
inc::Module::Install 1.06
Module::Install::XSUtil 0.45
Module::Install::TestTarget 0.19
Module::Install::AuthorTests 0.002
);
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;
}
$INC{'Module/Install/ExtraTests.pm'} = 1;# considered harmful!
}
use inc::Module::Install;
all_from 'lib/Text/Xslate.pm';
requires 'Mouse' => 'v2.4.5';
requires 'Data::MessagePack' => '0.38';
requires 'parent' => '0.221';
requires 'Scalar::Util' => '1.14';
test_requires 'Test::More' => 0.88; # done_testing()
test_requires 'Test::Requires';
test_requires 'File::Copy::Recursive';
test_requires 'File::Path' => '2.07';
#test_requires 'Test::LeakTrace';
install_script 'xslate';
tests_recursive;
author_tests 'xt';
my $want_xs = want_xs();
if($want_xs) {
use_xshelper;
cc_warnings;
cc_src_paths qw(src);
}
resources
homepage => 'http://xslate.org/',
bugtracker => 'https://github.com/xslate/p5-Text-Xslate/issues',
repository => 'https://github.com/xslate/p5-Text-Xslate',
ProjectHome => 'https://github.com/xslate',
MailingList => 'http://groups.google.com/group/xslate',
;
system "$^X tool/opcode.PL src/xslate_opcode.inc >xslate_ops.h";
system "$^X tool/opcode_for_pp.PL src/xslate_opcode.inc > lib/Text/Xslate/PP/Const.pm";
postamble <<'M';
src/Text-Xslate.xs :: src/xslate_opcode.inc
# xslate_ops.h is automatically generated by src/Text-Xslate.xs
xslate_ops.h :: src/xslate_opcode.inc tool/opcode.PL
$(PERLRUNINST) tool/opcode.PL src/xslate_opcode.inc >xslate_ops.h
lib/Text/Xslate/PP/Const.pm :: src/xslate_opcode.inc tool/opcode_for_pp.PL
$(PERLRUNINST) tool/opcode_for_pp.PL src/xslate_opcode.inc > lib/Text/Xslate/PP/Const.pm
M
my @testall;
if($Module::Install::AUTHOR) {
@testall = (alias => 'test');
}
if($want_xs) {
test_target test_pp => (
env => { PERL_ONLY => 1 },
@testall,
);
}
clean_files qw(
Text-Xslate-*
nytprof *.out
cover_db
.xslate_cache
);
WriteAll(check_nmake => 0);