wml::mod::MakeMaker(3)

πŸ“¦
version 2.32.0 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ’– wml::mod::MakeMaker(3) πŸ’–

okay so bestie, welcome to the EN Tools manual page for wml::mod::MakeMaker and honestly? it's giving "makefile generator that actually gets you". let's go πŸ¦‹


✨ NAME ✨

wml::mod::MakeMaker β€” a Makefile generator πŸ’…


✨ SYNOPSIS ✨

#!wml -o Makefile
#use wml::mod::MakeMaker

<write-makefile [attributes]>

🌸 DESCRIPTION 🌸

So this include file is literally your bestie for writing a Makefile that distributes your own WML modules. no cap, it makes it so easy. it's inspired by the Perl module ExtUtils::MakeMaker, if you know her πŸ’œ

πŸŽ€ Default targets πŸŽ€

  • make all β€” the default target, bestie. it builds all the include files and their documentation. main character behaviour fr.
  • make install β€” installs the include files and the documentation into the locations that wml -V2 tells you about. periodt.
  • make clean β€” removes the files that make generated. bye πŸ‘‹
  • make distclean β€” same energy as make clean, except it also removes the Makefile itself. she's thorough.
  • make dist β€” builds a distribution. ⚠️ this one should only be used by the module maintainer, okay? if there's a MANIFEST file, then the list of files to include gets taken from that file. otherwise the tarball contains all source files, plus MakeMaker.wml, Makefile.wml, shtool and README if those files exist. no extra guessing, that's just the rules.

πŸ’« Overriding default targets πŸ’«

To build the Makefile, all the targets get put into separate buffers during pass 3, and then those buffers get diverted by pass 5. so if you wanna override a default target, you just redefine the buffer contents. the buffer names are super explicit, no detective work needed:

MK_ALL MK_INSTALL MK_CLEAN MK_DISTCLEAN MK_CONFIG MK_RELEASE

🧚 Defining new targets 🧚

MK_USER is empty and it is devoted to this task. she's just sitting there waiting for you to make her iconic ✨


πŸ‘‘ ATTRIBUTES πŸ‘‘

🚨 bestie listen up: the first three attributes are mandatory. not optional. mandatory mandatory.
  • package β€” the name of the package πŸ’–
  • version β€” its version number ⭐
  • modules β€” list of modules to build and install. it's a space separated list of filenames. modules should live in a sub-directory to be compliant with the actual file hierarchy. for instance, the declaration
modules="math/log.tmpl math/exp.tmpl"

tells you that after compilation there are two modules, which are math/log.tmpl and math/exp.tmpl. these modules will be installed to LibDir/include/math/log.tmpl and LibDir/include/math/exp.tmpl.

these modules then get called in a WML file by

#use tmpl::math::log
#use tmpl::math::exp

source files for these modules are obtained by replacing the suffix with .src.

  • src-ext β€” defines an alternate suffix for the source files πŸ“
  • man-ext β€” section number of the manual in which man files get put. default is 3.
  • extradistfiles β€” space separated list of files to include in a distribution. by default, all source files plus MakeMaker.wml, Makefile.wml, README and shtool are included in a distribution.

🌈 EXAMPLE 🌈

<write-makefile
   package="log"
   version="3.14"
   modules="math/log.tmpl"
   source-ext="exp"
>

this will build the tmpl::math::log include module from the math/log.exp source file. this source file will also produce the tmpl::math::log(3) manpage. ate. πŸ’…


πŸ”₯ NOTES πŸ”₯

please do not use a .wml suffix for your modules, bestie 😭 those should be reserved for the official WML modules shipped with WML. you may instead put your initials or anything else. iykyk πŸ’œ


🫢 AUTHOR 🫢

 Denis Barbier
 barbier@engelschall.com

⭐ REQUIRES ⭐

 Internal: P1, P2, P3, P5
 External: --

and that's the whole page, babe πŸ’– this was wml::mod::MakeMaker(3) from EN Tools, dated 2020-11-29. go build something iconic with it, ily, bye πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from