Skip to content
Browse files

MakeMaker.pm: use EU::MakeMaker custom postamble to build libffi

  • Loading branch information...
1 parent 2f8c53a commit 620dff36c7ead7df2e0d26a01600c2b57e6a6565 @ghedo committed Dec 27, 2012
Showing with 8 additions and 4 deletions.
  1. +8 −4 inc/MakeMaker.pm
View
12 inc/MakeMaker.pm
@@ -8,10 +8,13 @@ override _build_MakeFile_PL_template => sub {
my ($self) = @_;
my $template = <<'TEMPLATE';
-chdir('xs/libffi');
-system('./configure --disable-builddir --with-pic');
-system('make');
-chdir('../..');
+sub MY::postamble {
+ return <<'MAKE_LIBFFI';
+$(MYEXTLIB):
+ cd xs/libffi && ./configure --disable-builddir --with-pic && $(MAKE)
+
+MAKE_LIBFFI
+}
TEMPLATE
@@ -23,6 +26,7 @@ override _build_WriteMakefile_args => sub {
%{ super() },
INC => '-I. -Ixs/libffi/include',
OBJECT => '$(O_FILES) xs/libffi/.libs/libffi.a',
+ MYEXTLIB => 'xs/libffi/.libs/libffi.a',
}
};

0 comments on commit 620dff3

Please sign in to comment.
Something went wrong with that request. Please try again.