ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/Makefile.PL
Revision: 1.7
Committed: Tue Oct 30 14:11:32 2007 UTC (16 years, 6 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.6: +10 -4 lines
Log Message:
do it differently

File Contents

# User Rev Content
1 root 1.4 use 5.006;
2    
3 root 1.7 use Config;
4 root 1.1 use ExtUtils::MakeMaker;
5    
6 root 1.7 $ENV{CC} = $Config{cc};
7     $ENV{CFLAGS} = join " ", map $Config{$_}, qw(inc optimize ccflags cccdlflags);
8     system "cd libevent && ./configure --disable-shared --enable-static --disable-maintainer-mode"
9     and die "configure failed.";
10    
11     $LIBS = qx<cd libevent && make printlibs>;
12    
13 root 1.1 WriteMakefile(
14     dist => {
15 root 1.2 PREOP => 'pod2text EV.pm | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;',
16 root 1.1 COMPRESS => 'gzip -9v',
17     SUFFIX => '.gz',
18     },
19 root 1.6 MYEXTLIB => 'libevent/.libs/libevent$(LIB_EXT)',
20 root 1.2 NAME => "EV",
21 root 1.7 LIBS => [$LIBS],
22 root 1.2 VERSION_FROM => "EV.pm",
23 root 1.5 PM => {
24     'EV.pm' => '$(INST_LIBDIR)/EV.pm',
25     'EV/AnyEvent.pm' => '$(INST_LIBDIR)/EV/AnyEvent.pm',
26     'EV/DNS.pm' => '$(INST_LIBDIR)/EV/DNS.pm',
27     'EV/EVAPI.h' => '$(INST_LIBDIR)/EV/EVAPI.h',
28     'EV/MakeMaker.pm' => '$(INST_LIBDIR)/EV/MakeMaker.pm',
29 root 1.6 'libevent/event.h' => '$(INST_LIBDIR)/EV/event.h',
30     'libevent/evdns.h' => '$(INST_LIBDIR)/EV/evdns.h',
31     'libevent/evhttp.h' => '$(INST_LIBDIR)/EV/evhttp.h',
32 root 1.5 },
33 root 1.1 );
34    
35 root 1.6 sub MY::postamble {
36     my $postamble =<<'END';
37    
38     clean::
39     -cd libevent && make distclean
40    
41     force:
42    
43 root 1.7 $(MYEXTLIB): force
44 root 1.6 cd libevent && $(MAKE) all
45    
46     END
47     }
48