Shipwri...zeBuild(3)

πŸ“¦
version 2.4.42 Β· 2 versions
, in fedora 43

πŸ’… Shipwright::Manual::CustomizeBuild πŸ’…

okay so bestie, welcome to section 3 of the User Contributed Perl Documentation β€” yes we're in the big kid manual pages now, and this one is all about CustomizeBuild, which is exactly what it sounds like. customizing the build. slay.


✨ NAME ✨

Shipwright::Manual::CustomizeBuild β€” literally just: how do you customize the build method for a source? that's the whole vibe. πŸŽ€


🌸 DESCRIPTION 🌸

so rn there are two ways to build a source, and you gotta pick your fighter:

  • through a perl script, scripts/foo/build.pl β€” this one lets you do heavy customization, like full main character energy, go wild πŸ’…
  • or using a list of tagged commands, scripts/foo/build β€” simpler, but lowkey less customizable πŸ¦‹

and here's the tea: scripts/foo/build.pl has higher precedence. so if both scripts/foo/build.pl and scripts/foo/build exist, the .pl one wins. periodt. no debate.


🧚 build.pl

when you execute build.pl for the source foo, your current working directory will be dists/foo. noted. that's just where you live now.

the script gets run with a list of arguments, and the format is designed to be easily extracted with Getopt::Long (iykyk).

  • --install-base=s β€” the base directory where the vessel is to be built to. like, where it's gonna end up living. 🏠 e.g. "--install-base '/tmp/test-xxxxxx/test'"
  • --flags=s β€” a list of flags, joined by comma. (peep Shipwright::Manual::UsingFlags for more info, bestie.) e.g. "--flags default,mysql"
  • --skip-test β€” whether to skip running tests or not. do we test? or do we ✨ not ✨
  • --force β€” if any test fails, whether to go on or just die. bold choice honestly πŸ’€
  • --clean β€” if run with this argument, the script should do the "clean" work instead of the "install" work. switching careers.

πŸ¦‹ build

this one is a text file. every line should either be blank or follow the format "type: command". the command gets executed line by line, and the current working directory for building the source foo will be dists/foo β€” same address as before, we don't move.

in a normal build script, you'll see these types of commands: configure, make, install, clean, and sometimes test. their functions should be self-explanatory for anyone familiar with building perl modules. (and if you're not familiar yet, bestie, you will be. we believe in you 🫢)

four template substitutions are available for use in the command: "%%PERL%%", "%%PERL_ARCHNAME%%", "%%INSTALL_BASE%%" and "%%MAKE%%". these can be used in cases where the path to perl, the perl archname (e.g. 'i486-linux-gnu-thread-multi'), the base install path or make command are needed β€” since they are not known beforehand or need to choose one later. basically they're the mystery boxes you fill in at runtime πŸ“¦βœ¨

and there are two special types: "test" and "clean".

⭐ test

if executed with --skip-test, this command won't be executed. if executed with --force, even if this command fails the build will continue. resilient queen. πŸ‘‘

πŸŽ€ clean

if executed with --clean, all commands will be skipped except this one. it's the only one invited to the party. πŸ’œ


🌈 SEE ALSO 🌈

  • Shipwright
  • Shipwright::Manual

πŸ‘‘ AUTHORS πŸ‘‘

sunnavy <sunnavy@bestpractical.com> πŸ’–


Shipwright is Copyright 2007-2015 Best Practical Solutions, LLC.

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


okay that's the whole page bestie, you ate that. go build something iconic. πŸ’…βœ¨

and that's a wrap from perl v5.42.0, dated 2025-07-25 β€” this manual page said what it said and then dipped. bye babes πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from