加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile.PL 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
# This -*- perl -*- script makes the Makefile
BEGIN { require 5.006_001 }
use ExtUtils::MakeMaker;
use Config qw(%Config);
my $PERL_CORE = grep { $_ eq 'PERL_CORE=1' } @ARGV;
#--- Attempt to find <poll.h>
my $define = "";
unless ($PERL_CORE or exists $Config{'i_poll'}) {
my @inc = split(/\s+/, join(" ", $Config{'usrinc'}, $Config{'incpth'}, $Config{'locincpth'}));
foreach $path (@inc) {
if (-f $path . "/poll.h") {
$define .= "-DI_POLL ";
last;
}
}
}
if ($] < 5.008 and !$PERL_CORE) {
open(FH,">typemap");
print FH "const char * T_PV\n";
close(FH);
}
#--- Write the Makefile
WriteMakefile(
VERSION_FROM => "IO.pm",
NAME => "IO",
OBJECT => '$(O_FILES)',
ABSTRACT => 'Perl core IO modules',
AUTHOR => 'Graham Barr <gbarr@cpan.org>',
PREREQ_PM => {
'Test::More' => 0,
},
( $PERL_CORE
? ()
: (
INSTALLDIRS => ($] < 5.011 ? 'perl' : 'site'),
clean => {FILES => 'typemap'},
)
),
($define ? (DEFINE => $define) : ()),
((ExtUtils::MakeMaker->VERSION() gt '6.30') ? ('LICENSE' => 'perl') : ()),
);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化