-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.header
34 lines (30 loc) · 980 Bytes
/
Makefile.header
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
our %PREREQ_PM;
BEGIN {
%PREREQ_PM= (
'ExtUtils::Depends' => '0.405',
'Alien::FluentBit' => '0.01',
);
# If the prereqs for this script are missing,
# write out a Makefile that tells CPAN to install them
my $use_prereqs_code= join('', map { "use $_ '$PREREQ_PM{$_}'; " } keys %PREREQ_PM).'1;';
print $use_prereqs_code."\n";
unless (eval $use_prereqs_code) {
warn "$@\n";
WriteMakefile(
NAME => 'Fluent::LibFluentBit',
PREREQ_FATAL => 1,
PREREQ_PM => \%PREREQ_PM,
);
exit 1; # not reached
}
}
my $dep= ExtUtils::Depends->new('Fluent::LibFluentBit');
$dep->set_inc(Alien::FluentBit->cflags);
$dep->set_libs(Alien::FluentBit->libs);
$dep->add_c('PerlFluentBit.c');
$dep->add_xs('LibFluentBit.xs');
$dep->add_pm(map { my $n= $_; $n =~ s/^lib/\$(INST_LIB)/; $_ => $n } <lib/*/*.pm>, <lib/*/*/*.pm>);
$dep->add_typemaps('typemap');
$dep->install('PerlFluentBit.h');
mkdir 'build', 0777;
$dep->save_config('build/IFiles.pm');