Module:...Makefile(3)

πŸ’… Module::Install::MakeMaker β€” Extension Rules for ExtUtils::MakeMaker ✨

okay so bestie, you're reading a User Contributed Perl Documentation page for Module:...Makefile(3) and honestly? it's giving "short but mighty" πŸŽ€ let's get into it.


🌸 SYNOPSIS 🌸

in your Makefile.PL, you literally just do this:

use inc::Module::Install;
WriteMakefile();

that's it. that's the whole vibe. slay πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this module is a cute lil wrapper around ExtUtils::MakeMaker β€” like it's the bestie that handles the small talk for you 🫢

it exports two functions:

  • prompt β€” which is literally just an alias for ExtUtils::MakeMaker::prompt
  • WriteMakefile β€” the main character πŸ‘‘

here's the tea on WriteMakefile: it passes on keyword/value pair functions straight to ExtUtils::MakeMaker::WriteMakefile. and the required parameters NAME and VERSION (or VERSION_FROM) are not necessary if it can find them unambiguously in your code. no cap, it'll just figure it out ✨


πŸŽ€ CONFIGURATION OPTIONS πŸŽ€

this module also adds some Configuration parameters of its own, and they're lowkey iconic:

πŸ’– NAME

NAME is required by ExtUtils::MakeMaker, periodt. but here's the thing β€” if you have a single module in your distribution, or if the module name indicated by the current directory exists under lib/, this module will use the guessed package name as the default 🧚

and if it can't find a default for NAME? it will just ask you to specify it manually. awkward but make it work πŸ™ˆ

πŸ’œ VERSION

ExtUtils::MakeMaker requires either the VERSION or VERSION_FROM parameter β€” no skipping that one.

but if this module can guess the package's NAME, it will attempt to parse the VERSION from it πŸ”₯

and if it can't find a default for VERSION? yep, it asks you to specify it manually. same energy πŸ’€


🌈 MAKE TARGETS 🌈

ExtUtils::MakeMaker provides you with many useful make targets. a "make target" is just the word you specify after make β€” like test for make test. highkey useful. some of the more useful targets are:

  • all β€” this is the default target. when you type make it's the same as entering make all. this target builds all of your code and stages it in the blib directory. iconic behaviour 🫢
  • test β€” run your distribution's test suite. go off bestie 🌸
  • install β€” copy the contents of the blib directory into the appropriate directories in your Perl installation.
  • dist β€” create a distribution tarball, ready for uploading to CPAN or sharing with a friend πŸ’–
  • clean distclean purge β€” remove the files created by perl Makefile.PL and make.
  • help β€” same as typing perldoc ExtUtils::MakeMaker.

now this module modifies the behaviour of some of these targets, depending on your requirements, and also adds the following targets to your Makefile πŸ‘‘:

  • cpurge β€” just like purge, except that it also deletes the files originally added by this module itself. self-aware king behaviour πŸ’…
  • chelp β€” short cut for typing perldoc Module::Install.
  • distsign β€” short cut for typing cpansign -s, for Module::Signature users to sign the distribution before release ✨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Module::Install
  • CPAN::MakeMaker
  • CPAN::MakeMaker::Philosophy

go read them, iykyk πŸ“š


🫢 AUTHORS 🫢

  • Adam Kennedy <adamk@cpan.org>
  • Audrey Tang <autrijus@autrijus.org>
  • Brian Ingerson <INGY@cpan.org>

some parts copyright 2008 - 2012 Adam Kennedy.

copyright 2002, 2003, 2004 Audrey Tang and Brian Ingerson.

this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

fr fr, it's free software β€” share it, remix it, just keep the same terms as Perl itself πŸ’–

⭐ and that's the whole page bestie! this doc ships with perl v5.42.0, dated 2023-04-29 β€” thanks for reading, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from