Questions tagged [makemaker]

42 questions
8
votes
2 answers

Using Perl's ExtUtils::MakeMaker, how can I compile an executable using the same settings as my XS module?

Given a Perl XS module using a C library, assume there is a Makefile.PL that is set up correctly so that all header and library locations, compiler and linker flags etc work correctly. Now, let's say I want to include a small C program with said XS…
Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
8
votes
4 answers

How do I start a new Perl module distribution?

I'm trying to set up a large-ish project, written in Perl. The IBM MakeMaker tutorial has been very helpful so far, but I don't understand how to link all the modules into the main program. In my project root, I have MANIFEST, Makefile.PL, README,…
Tim
  • 361
  • 1
  • 5
  • 14
7
votes
3 answers

What tools can help build an XS project?

I've recently started learning XS using perlxstut and the tutorial suggests that I create my module using the old h2xs tool to create an ExtUtils::MakeMaker-based project. However for pure Perl projects, h2xs/EUMM has long been disfavoured in favour…
Philip Potter
  • 8,975
  • 2
  • 37
  • 47
6
votes
1 answer

Is there a way to have dependencies defined by OS in a CPAN distribution?

I'm working on a CPAN distribution that can work on Win32 and *nix. However, in order for it to work on Win32, it requires another CPAN distribution (module) that can only be installed on Win32. The problem with this is that, by declaring that…
Francisco Zarabozo
  • 3,676
  • 2
  • 28
  • 54
6
votes
1 answer

ExtUtils::MakeMaker custom target

Is there a way to have a custom Makefile target to be generated by ExtUtils::MakeMaker? Say, I'd like to do some specific things that only a developer is interested in, like running pod and regression tests; I can use env variables for that but…
Alex Tokarev
  • 4,821
  • 1
  • 20
  • 30
6
votes
2 answers

How do I build 32-bit XS modules for a 32-bit custom Perl on a 64-bit CentOS system?

I have a 64-bit CentOS 6 system running a custom-built version of Perl 5.12.5, that is build for 32-bits. (Alas, this is because we are using the same RPMs for 32-bit and 64-bit systems.) When I build XS modules (e.g. JSON::XS) on the server, it…
Rob
  • 781
  • 5
  • 19
6
votes
2 answers

How do I override perl's compilation flags when building modules?

When building a Perl module ExtUtils::MakeMaker uses the flags defined in Config.pm (see perldoc Config) for values such as ccflags and ldflags. How do I override theses values (short of editing the Makefile.PL)? perl Makefile.PL ldflags=
5
votes
1 answer

MakeMaker update its list of files at `make` time

I'm working on a Perl module called Mite. It is a "compiler", of sorts. You write Perl classes using a Moose-like declarative OO syntax. Rather than doing all the work to put the class together every time it's executed, Mite does that work at…
Schwern
  • 153,029
  • 25
  • 195
  • 336
5
votes
3 answers

How to specify test prerequisites in the ExtUtils::MakeMaker Makefile.PL

PREREQ_PM specifies the runtime prerequisites, but how to specify which modules are required to run the test cases? Should I use BUILD_REQUIRES for this?
Tim
  • 13,904
  • 10
  • 69
  • 101
3
votes
1 answer

How to change default CFLAGS for MakeMaker

How do I get Perl MakeMaker to change the default value for CFLAGS that it inserts into Makefiles? Based on this post, I tried this: export CFLAGS=... then inside cpan, I confirmed it with ! print $ENV{CFLAGS} but it still uses whatever CFLAGS…
Lawrence I. Siden
  • 9,191
  • 10
  • 43
  • 56
3
votes
1 answer

How can I tell Makemaker to run tests in parallel?

I have a module with a MakeMaker generated Makefile and I want to run my unit tests (make test) in parallel. Test::Harness accepts e.g., HARNESS_OPTIONS=j4 to use 4 threads. But I don't see how MakeMaker's test target can be adjusted to set this…
Robert
  • 7,394
  • 40
  • 45
  • 64
3
votes
2 answers

How can I change the directory holding the test files in ExtUtils::Makemaker?

How can you change the default tests path in Makefile.PL from the default value t/*.t? There's an attribute mentioned in the documentation but it does not work. Anybody know how to that?
marghi
  • 233
  • 1
  • 9
3
votes
1 answer

How to populate 'provides' field in META files using ExtUtils::MakeMaker

One of my modules is failing the CPANTS policy meta_yml_has_provides The documentation states: Add all modules contained in this distribution to the META.yml field 'provides'. Module::Build or Dist::Zilla::Plugin::MetaProvides do this automatically…
MichielB
  • 4,181
  • 1
  • 30
  • 39
3
votes
3 answers

How do I add multiple Perl modules to Makefile.PL?

Looking for some insight on how to add multiple PM files to the MakeMaker script? I see this documentation and all the examples look like one file is added, how do I add multiple files? use ExtUtils::MakeMaker; WriteMakefile( NAME =>…
Phill Pafford
  • 83,471
  • 91
  • 263
  • 383
2
votes
1 answer

How to tell MakeMaker to build XS files in a subdirectory?

I've got a largish project to which I've just added some XS code, and I'd like to keep the top-level directory as clean as possible. I want to put the XS file and typemap et al. into a subdirectory, but if I do, MakeMaker can't find them. So right…
Hercynium
  • 929
  • 9
  • 18
1
2 3