MAKEFILE(8)

๐Ÿ“ฆ
version 11.0 ยท 4 versions
, in nixpkgs unstable

๐ŸŽ€ MAKEFILE(8) ๐ŸŽ€

okay so bestie, plot twist: this is not a manpage about a command, it's the actual NetBSD Makefile that builds the sectionโ€‘8 manpages. It's the girl behind the girl. The mainโ€‘character energy behind every .8 file you've ever read. Periodt.

It struts in with its RCS header, like:

#       $NetBSD:  Makefile,v 1.112 2024/12/07 18:45:20 martin Exp
$ #       from: @(#)Makefile      8.1 (Berkeley) 6/5/93

Yes she's on version 1.112, dated 2024/12/07 18:45:20, by martin, and she traces her whole lineage back to @(#)Makefile 8.1 (Berkeley) 6/5/93. Legacy. Iconic. ๐Ÿ’…


โœจ MAN โ€” the pages this thing actually ships โœจ

Here's the assignment exactly as she wrote it:

MAN=    MAKEDEV.8 MAKEDEV.local.8 afterboot.8 boot.8  compat_30.8
       compat_bsdos.8   compat_freebsd.8   compat_linux.8    compat_netbsd32.8       compat_sunos.8               compat_ultrix.8
        creds_msdos.8          diskless.8   hpcboot.8     intro.8
nis.8   pam.8   rc.8   rc.subr.8   rescue.8            veriexec.8
     wizd.8

(she actually lineโ€‘breaks compat_netbsd32.8 midโ€‘word as comโ€ pat_netbsd32.8 in the raw file โ€” that's just a wrap, bestie, the page is fine, don't panic ๐Ÿ˜ญ)

So MAN= is literally these 22 pages, and I'm listing every single one because we do not skip entries in this house ๐Ÿซถ:

  • MAKEDEV.8 ๐Ÿ’–
  • MAKEDEV.local.8 ๐Ÿ’–
  • afterboot.8 โœจ
  • boot.8 โœจ
  • compat_30.8 ๐Ÿฆ‹
  • compat_bsdos.8 ๐Ÿฆ‹
  • compat_freebsd.8 ๐Ÿฆ‹
  • compat_linux.8 ๐Ÿฆ‹
  • compat_netbsd32.8 ๐Ÿฆ‹
  • compat_sunos.8 ๐Ÿฆ‹
  • compat_ultrix.8 ๐Ÿฆ‹
  • creds_msdos.8 ๐ŸŒธ
  • diskless.8 ๐ŸŒธ
  • hpcboot.8 ๐ŸŒธ
  • intro.8 ๐ŸŒŸ
  • nis.8 ๐ŸŒˆ
  • pam.8 ๐ŸŒˆ
  • rc.8 ๐Ÿ‘‘
  • rc.subr.8 ๐Ÿ‘‘
  • rescue.8 ๐Ÿ”ฅ
  • veriexec.8 ๐Ÿ”ฅ
  • wizd.8 ๐Ÿ’€

Every one of these is an MLINKS+= line, and every one means "this page also answers to this other name." The alias serve, honestly. ๐ŸŽ€

  • MAKEDEV.8 โ†’ makedev.8
  • MAKEDEV.local.8 โ†’ makedev.local.8
  • compat_netbsd32.8 โ†’ netbsd32.8
  • nis.8 โ†’ yp.8
  • rc.8 โ†’ rc.d.8
  • rc.8 โ†’ rc.local.8
  • rc.8 โ†’ rc.shutdown.8
  • rc.8 โ†’ rc.shutdown.final.8

Look at rc.8 with four whole aliases. Main character behaviour, lowkey. ๐Ÿ‘‘


๐ŸŒˆ SUBDIR โ€” the perโ€‘architecture folders ๐ŸŒˆ

Then SUBDIR= sends the build into one folder per architecture, and yes, all 28 are invited to the party:

  • man8.acorn32
  • man8.alpha
  • man8.amiga
  • man8.atari
  • man8.cobalt
  • man8.dreamcast
  • man8.emips
  • man8.evbarm
  • man8.hp300
  • man8.hpcarm
  • man8.hpcmips
  • man8.hpcsh
  • man8.hppa
  • man8.mac68k
  • man8.macppc
  • man8.mvme68k
  • man8.next68k
  • man8.pmax
  • man8.prep
  • man8.sandpoint
  • man8.sgimips
  • man8.sparc
  • man8.sparc64
  • man8.sun2
  • man8.sun3
  • man8.vax
  • man8.x68k
  • man8.x86

๐Ÿ”ฅ the makedevs rule โ€” where the magic happens ๐Ÿ”ฅ

The comment above it says "create MAKEDEV.8 from ../../etc/MAKEDEV.tmpl", and the target is makedevs:. Verbatim, because I would never edit a queen's homework:

#   create   MAKEDEV.8   from   ../../etc/MAKEDEV.tmpl  makedevs:
        cd ${.CURDIR} && ${HOST_SH} MAKEDEV2manpage.sh

So she cds into ${.CURDIR} (&& because we're not animals) and runs MAKEDEV2manpage.sh with ${HOST_SH}. That's the whole recipe. Simple, slay, done. โœจ


๐Ÿซถ the signโ€‘off ๐Ÿซถ

So anyway, this page is brought to you by $NetBSD: Makefile,v 1.112 2024/12/07 18:45:20 martin Exp, descended from from: @(#)Makefile 8.1 (Berkeley) 6/5/93, and it ends with the final line MANPAGE โ€” literally the goodbye kiss at the bottom of the file. mwah. ๐Ÿ’‹ go read some section 8 pages, bestie, you earned it ๐ŸŒธ๐Ÿฆ‹๐Ÿ’–

๐Ÿ“ฆ where this page comes from