Makefile.PL 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. use 5.018001;
  2. use ExtUtils::MakeMaker;
  3. # See lib/ExtUtils/MakeMaker.pm for details of how to influence
  4. # the contents of the Makefile that is written.
  5. my $XSPARAGRAPH_INTERFACE_VERSION = "1";
  6. # Verify XS version in configure.ac is the same as in the current file.
  7. my $fh;
  8. open $fh, "configure.ac";
  9. if ($fh) {
  10. while (my $line = <$fh>) {
  11. if ($line =~ /^\s*XSPARAGRAPH_INTERFACE_VERSION\s*=\s*([^\s]+)\s$/) {
  12. my $configure_XSPARAGRAPH_INTERFACE_VERSION = $1;
  13. if ($configure_XSPARAGRAPH_INTERFACE_VERSION ne $XSPARAGRAPH_INTERFACE_VERSION) {
  14. die "configure.ac XSPARAGRAPH_INTERFACE_VERSION $configure_XSPARAGRAPH_INTERFACE_VERSION != $XSPARAGRAPH_INTERFACE_VERSION\n";
  15. }
  16. last;
  17. }
  18. }
  19. }
  20. WriteMakefile(
  21. NAME => 'Texinfo::Convert::XSParagraph::XSParagraph',
  22. VERSION_FROM => 'XSParagraph.pm', # finds $VERSION
  23. PREREQ_PM => {}, # e.g., Module::Name => 1.1
  24. ($] >= 5.005 ? ## Add these new keywords supported since 5.005
  25. (AUTHOR => 'Gavin Smith <gavinsmith0123@gmail.com>') : ()),
  26. LIBS => [''], # e.g., '-lm'
  27. DEFINE => '', # e.g., '-DHAVE_SOMETHING'
  28. INC => '-I.', # e.g., '-I. -I/usr/include/other'
  29. # Un-comment this if you add C files to link with later:
  30. OBJECT => '$(O_FILES)', # link all the C files too
  31. XS_VERSION => "$XSPARAGRAPH_INTERFACE_VERSION",
  32. #'MYEXTLIB' => 'mylib/libxspara.a',
  33. );
  34. sub MY::postable {
  35. '
  36. $(MYEXTLIB): Makefile
  37. cd mylib && $(MAKE) $(PASSTHRU)
  38. ';
  39. }