BUILD.MAN.MK(5)

πŸ“¦ version 3.1, in nixos 26.05, nixpkgs unstable

✨ build.man.mk β€” bsdbuild compilation of UNIX manual pages ✨

Okay so bestie, this is the File Formats Manual for build.man.mk, and it's literally everything you need to know about compiling UNIX manual pages with bsdbuild. Let's get into it πŸ’…


πŸ’– NAME πŸ’–

build.man.mk β€” bsdbuild - compilation of UNIX manual pages. That's the whole name, no cap. It's giving "I process man pages" energy.

🌸 SYNOPSIS 🌸

.include <bsd.man.mk>

That's the only line, bestie. Simple. Slay.

πŸ¦‹ DESCRIPTION πŸ¦‹

The build.man.mk module processes UNIX manual pages files in mandoc(1) format into presentation-ready documents in ASCII, PostScript, PDF or HTML format. Like, it takes your mandoc source and turns it into something you can actually look at. Iconic.

πŸ’€ TARGETS πŸ’€

Okay so here are all the targets you can run. Each one is a different vibe, and ngl, they're all valid:

  • all-catman β€” Produce preformatted manual pages from the specified mandoc source files. And it fails silently (no cap) on systems where mandoc/nroff are unavailable, or where preformatted manual pages are not preferred. It's giving "ghost mode" 😢
  • clean-man β€” Clean up output files. That's it. Just cleanup. 🧹
  • install-man-dirs β€” Create empty section directories in ${MANDIR}. Directory creation slay. πŸ“
  • install-man β€” Install the manpages into ${MANDIR}. Yes bestie, put them where they belong. πŸ’–
  • install-manlinks β€” Install the manpage symlinks into ${MANDIR}. Symlinks are iconic. πŸ”—
  • man β€” Display a manpage (passed via the MAN argument), by feeding its ASCII formatted version to ${PAGER}. So you can actually read the thing. πŸ‘€
  • manlinks β€” Scan the ${MAN*} sources and auto-generate a .manlinks.mk file defining links for function names (i.e., where .Fn appears in a SYNOPSIS or ".nr nS 1" block), or where the special directive "MANLINK(name)" appears in a comment. Auto-generation is main character energy. ✨
  • lint β€” Parse only, produce no output. Display verbose warnings. It's the "just checking" vibe. πŸ”

Vibe check: all targets present and accounted for. Periodt.

πŸŽ€ VARIABLES πŸŽ€

These are the variables you need to know. Fr fr, don't skip them, bestie.

  • MAN[1-9] β€” List of mandoc input source files (with the .[1-9] extension). So like foo.1, bar.8, etc. Got it. πŸ“š
  • MANDOC β€” Mandoc processor (usually "mandoc" or "nroff -Tmandoc", depending on platform). This is typically set by a ./configure script (the needed test is included by default in all configure scripts by mkconfigure(1)). So you probably don't have to touch it. Slay. πŸ› οΈ
  • MANLINKS β€” A list of symbolic links that should be created by the install target. The elements of this list are of the form "Foo.1:Bar.1", where "Bar.1" is the symbolic link, and "Foo.1" is the destination manpage. Typically, MANLINKS is defined in the .manlinks.mk files which are auto-generated by the manlinks target. Link city, population: your manpages. πŸ”—

Highkey obsessed with how straightforward these are.

🌈 SEE ALSO 🌈

πŸ‘‘ HISTORY πŸ‘‘

build.man.mk first appeared in BSDBuild 1.0 β€” the way that's giving "OG status" πŸ‘‘.

And just so you know, BSDBuild is based on the 4.4BSD build system. Periodt. πŸ’…


Not me writing a whole love letter to a build system 😭. Hope this helped you understand build.man.mk without falling asleep. Now go process some man pages and slay ✨.

Debian β€” July 14, 2015 β€” BUILD.MAN.MK(5) β€” that's the whole thing. Love ya! πŸ’–

πŸ“¦ where this page comes from