BUILD.COMMON.MK(5)

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

πŸŽ€ build.common.mk(5) β€” the bsdbuild common defines, explained by your favorite Unix bestie πŸ’–

okay so before we even start: this is a File Formats Manual page, and it's lowkey the blueprint for the whole BSDBuild system. it's giving "shared brain cell" energy for all the other modules. let's get into it ✨


🌸 SYNOPSIS 🌸

.include <bsd.common.mk>

that's literally it. one line and you're in. slay 🫢


πŸ’… DESCRIPTION πŸ’…

okay so build.common.mk defines the common variables that all the different BSDBuild modules use. you can reference them from your Makefiles, but bestie listen: they're almost always treated read-only and get overridden by a Makefile.config that a configure script generates. details live in mkconfigure(1), iykyk πŸ’œ


⭐ TARGETS ⭐

not a single one. this module defines no target. it's a vibe-only module, no cap πŸ’€


πŸ‘‘ VARIABLES πŸ‘‘

these are the main characters. every single one, no skips:

  • PREFIX β€” the base target installation directory. defaults to /usr/local. 🏠
  • DESTDIR β€” optional prefix for all the installation directories. this one is typically passed as an argument to a make install command. defaults to an empty string (yes, literally empty, that's the default fr fr).
  • STATEDIR β€” installation directory for writeable machine-wide data files. defaults to PREFIX/var.
  • SYSCONFDIR β€” the system-wide configuration directory. defaults to PREFIX/etc.
  • DATADIR β€” installation directory for read-only machine-wide data files. πŸ“
  • BINDIR β€” installation directory for executables. defaults to PREFIX/bin.
  • LIBDIR β€” installation directory for library files. defaults to PREFIX/lib.
  • MODULEDIR β€” installation directory for dynamically-loaded modules. defaults to PREFIX/lib, but heads up: this default is almost always overridden by the application's configure script. πŸ™ˆ
  • INCLDIR β€” installation directory for library header files. defaults to PREFIX/include.
  • MANDIR β€” installation directory for manual pages. defaults to PREFIX/man. (hi, that's where this page lives πŸ’–)
  • SUDO β€” optional path to sudo(8). if it's set, all modules will use it for privileged commands. use responsibly bestie πŸ”₯
  • SH β€” path to the Bourne shell. defaults to sh.
  • FIND β€” path to the find 1 command. not used by BSDBuild itself, but it's super useful for maintainer scripts and such. πŸ¦‹
  • AWK β€” path to the awk interpreter. also not used by BSDBuild itself, but again: maintainer scripts, etc.
  • INSTALL_PROG β€” the command to execute for installing an executable file. defaults to install -c -m 755.
  • INSTALL_LIB β€” the command to execute for installing a library file. defaults to install -c -m 644.
  • INSTALL_DATA β€” the command to execute for installing a data file. defaults to install -c -m 644.
  • INSTALL_INCL β€” the command to execute for installing a library header file. defaults to install -c -m 644.
  • DEINSTALL_PROG β€” the command to execute for uninstalling an executable.
  • DEINSTALL_LIB β€” the command to execute for uninstalling a library.
  • DEINSTALL_DATA β€” the command to execute for uninstalling a data file.
  • DEINSTALL_INCL β€” the command to execute for uninstalling a library header file.
ngl the INSTALL_*/DEINSTALL_* pairs are such a mood β€” one for putting things in, one for taking them back out. balance. 🧚

🌈 SEE ALSO 🌈

go read those next, bestie, they're the sequels ✨


πŸ¦‹ HISTORY πŸ¦‹

build.common.mk first appeared in BSDBuild 1.0. iconic behavior honestly πŸ‘‘

and fun fact: BSDBuild is based on the 4.4BSD build system. the lore is deep πŸ“œ


okay that's the whole page, no cap. πŸ’…

sign-off time: this one came from the Debian crew, dated July 18, 2007, page BUILD.COMMON.MK(5) β€” mwah, love that for them πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from