BUILD.COMMON.MK(5)
π 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 amake installcommand. defaults to an empty string (yes, literally empty, that's the default fr fr).STATEDIRβ installation directory for writeable machine-wide data files. defaults toPREFIX/var.SYSCONFDIRβ the system-wide configuration directory. defaults toPREFIX/etc.DATADIRβ installation directory for read-only machine-wide data files. πBINDIRβ installation directory for executables. defaults toPREFIX/bin.LIBDIRβ installation directory for library files. defaults toPREFIX/lib.MODULEDIRβ installation directory for dynamically-loaded modules. defaults toPREFIX/lib, but heads up: this default is almost always overridden by the application's configure script. πINCLDIRβ installation directory for library header files. defaults toPREFIX/include.MANDIRβ installation directory for manual pages. defaults toPREFIX/man. (hi, that's where this page lives π)SUDOβ optional path tosudo(8). if it's set, all modules will use it for privileged commands. use responsibly bestie π₯SHβ path to the Bourne shell. defaults tosh.FINDβ path to thefind 1command. not used by BSDBuild itself, but it's super useful for maintainer scripts and such. π¦AWKβ path to theawkinterpreter. also not used by BSDBuild itself, but again: maintainer scripts, etc.INSTALL_PROGβ the command to execute for installing an executable file. defaults toinstall -c -m 755.INSTALL_LIBβ the command to execute for installing a library file. defaults toinstall -c -m 644.INSTALL_DATAβ the command to execute for installing a data file. defaults toinstall -c -m 644.INSTALL_INCLβ the command to execute for installing a library header file. defaults toinstall -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 theINSTALL_*/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
- nixos 26.05: bsdbuild 3.1
- nixpkgs unstable: bsdbuild 3.1
- Copyright (c) 2007-2009 Hypertriton, Inc. <http://www.hypertriton.com/>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms