Commit | Line | Data |
0f1612a7 |
1 | # Module makefile for threads (using ExtUtils::MakeMaker) |
2 | |
3 | require 5.008; |
4 | |
5 | use strict; |
6 | use warnings; |
7 | |
fc6e75a2 |
8 | use ExtUtils::MakeMaker; |
0f1612a7 |
9 | |
10 | |
11 | # Build options for different environments |
12 | my @conditional_params; |
13 | if (grep { $_ eq 'PERL_CORE=1' } @ARGV) { |
14 | # Core |
15 | push(@conditional_params, 'MAN3PODS' => {}, |
16 | 'NORECURS' => 1); |
17 | } else { |
18 | # CPAN |
19 | push(@conditional_params, 'CCFLAGS' => '-DHAS_PPPORT_H'); |
20 | } |
21 | |
fc6e75a2 |
22 | |
fc6e75a2 |
23 | WriteMakefile( |
0f1612a7 |
24 | 'NAME' => 'threads', |
25 | 'AUTHOR' => 'Artur Bergman <sky AT crucially DOT net>', |
26 | 'VERSION_FROM' => 'threads.pm', |
27 | 'ABSTRACT_FROM' => 'threads.pm', |
28 | 'PM' => { |
29 | 'threads.pm' => '$(INST_LIBDIR)/threads.pm', |
30 | }, |
31 | 'PREREQ_PM' => { |
32 | 'threads::shared' => 0, |
33 | 'XSLoader' => 0, |
34 | }, |
35 | 'INSTALLDIRS' => 'perl', |
36 | |
37 | ((ExtUtils::MakeMaker->VERSION() lt '6.25') ? |
38 | ('PL_FILES' => { }) : ()), |
39 | ((ExtUtils::MakeMaker->VERSION() gt '6.30') ? |
40 | ('LICENSE' => 'perl') : ()), |
41 | |
42 | @conditional_params |
fc6e75a2 |
43 | ); |
44 | |
0f1612a7 |
45 | |
46 | # Add additional target(s) to Makefile for use by module maintainer |
47 | sub MY::postamble |
48 | { |
49 | return <<'_EXTRAS_'; |
50 | ppport: |
51 | @( cd /tmp; perl -e 'use Devel::PPPort; Devel::PPPort::WriteFile("ppport.h");' ) |
52 | @if ! cmp -s ppport.h /tmp/ppport.h; then \ |
53 | diff ppport.h /tmp/ppport.h ; \ |
54 | echo; \ |
55 | perl /tmp/ppport.h; \ |
56 | fi |
57 | _EXTRAS_ |
58 | } |
59 | |
60 | # EOF |