ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Makefile.PL
Revision: 1.16
Committed: Thu May 13 16:12:14 2004 UTC (20 years ago) by pcg
Content type: text/plain
Branch: MAIN
Changes since 1.15: +12 -0 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 use ExtUtils::MakeMaker;
2    
3 root 1.4 if ($] < 5.006) {
4     print <<EOF;
5    
6     ***
7     *** WARNING: This module is quite low-level and uses undocumented perl
8     *** internals to do it's job. While it seems to work fine with perl-5.8,
9     *** 5.7 and 5.6, it has not been tested with older versions. If it
10     *** compiles and passes the testsuite, it should work. Otherwise you
11 root 1.11 *** should either upgrade or fix it ;)
12 root 1.4 ***
13     *** Marc Lehmann <pcg\@goof.com>
14     ***
15    
16     EOF
17     }
18 root 1.1
19 root 1.14 if (eval { require Event }) {
20     if ($Event::VERSION < 0.86) {
21     print "*** Please read the INSTALL file, you need a patched Event.\n";
22 pcg 1.16 } elsif ($Event::VERSION == 0.88) {
23     print <<EOF
24    
25     ***
26     *** WARNING: Event version $Event::VERSION found, NOT building Event support.
27     ***
28     *** This version of Event is broken. The only currently known non-broken
29     *** version of Event is 0.87. Please install this version, or try with a
30     *** newer version that hopefully has the bug fixed.
31     ***
32    
33     EOF
34 root 1.14 } else {
35     $EVENT = 1;
36     $DEFINE .= " -DHAVE_EVENT=1";
37     print "\nEvent version $Event::VERSION found, building Event support.\n\n";
38     }
39     print "\n";
40     } else {
41     print "\n*** Event not found, not build Event support.\n\n";
42     }
43    
44 root 1.1 WriteMakefile(
45 root 1.5 dist => {
46     PREOP => 'pod2text Coro.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
47     COMPRESS => 'gzip -9v',
48     SUFFIX => '.gz',
49     },
50     NAME => "Coro",
51 root 1.1 VERSION_FROM => "Coro.pm",
52 root 1.7 DIR => ['Coro', ($EVENT ? 'Event' : ())],
53 root 1.6 PREREQ_PM => {
54 root 1.14 Event => 0.86,
55 root 1.10 Scalar::Util => 0.00,
56 root 1.5 },
57 root 1.7 PM => {
58 root 1.9 'Coro.pm' => '$(INST_LIBDIR)/Coro.pm',
59 root 1.14
60     'Coro/State.pm' => '$(INST_LIBDIR)/Coro/State.pm',
61    
62     'Coro/MakeMaker.pm' => '$(INST_LIBDIR)/Coro/MakeMaker.pm',
63     'Coro/CoroAPI.h' => '$(INST_LIBDIR)/Coro/CoroAPI.h',
64    
65     'Coro/Cont.pm' => '$(INST_LIBDIR)/Coro/Cont.pm',
66    
67     'Coro/Specific.pm' => '$(INST_LIBDIR)/Coro/Specific.pm',
68    
69     'Coro/Timer.pm' => '$(INST_LIBDIR)/Coro/Timer.pm',
70     'Coro/Signal.pm' => '$(INST_LIBDIR)/Coro/Signal.pm',
71     'Coro/Channel.pm' => '$(INST_LIBDIR)/Coro/Channel.pm',
72     'Coro/Semaphore.pm' => '$(INST_LIBDIR)/Coro/Semaphore.pm',
73     'Coro/SemaphoreSet.pm'=> '$(INST_LIBDIR)/Coro/SemaphoreSet.pm',
74     'Coro/RWLock.pm' => '$(INST_LIBDIR)/Coro/RWLock.pm',
75 root 1.8 },
76 root 1.1 );
77    
78 root 1.3 sub MY::postamble {
79     <<EOF;
80    
81     # set \$VERSION in all modules
82     setver:
83 root 1.13 \$(PERL) -pi -e 's/^(\\s*\\\$\$VERSION\\s*=\\s*).*\$\$/\$\${1}\$(VERSION);/' *.pm Coro/*.pm Event/*.pm
84 root 1.3
85     EOF
86     }
87    
88