8.20. bmake 20260406
Install the portable NetBSD make implementation for packages that expect BSD make behavior.
Input assumption: bmake-20260406.tar.gz is already present in /sources from the chapter 4 source staging step.
Source URL: https://www.crufty.net/ftp/pub/sjg/bmake-20260406.tar.gz
Upstream build note: upstream documents ./bmake/boot-strap as the preferred bootstrap path and also supports the standard ./configure, make, and make install flow. This section uses lbi_configure because the generated configure script accepts the book's standard installation directory options, then uses the newly built bmake for installation so the book's directory layout is applied consistently.
Licenses:
- BSD-2-Clause
Dependencies:
- musl (libc)
- make
bmake is a portable NetBSD make implementation. we need it to provide BSD make semantics and the accompanying mk include files for packages that are written for BSD-style makefiles.
Extract and Enter the Source Tree
cd /sources
rm -rf bmake
tar -xf bmake-20260406.tar.gz
cd bmake
Configure bmake
lbi_configure \
--with-default-sys-path=/system/share/mk \
--with-mksrc=mk \
--with-filemon=no \
--without-lua
Build bmake
make $LWI_MAKE_FLAGS
Install bmake
MAKESYSPATH=mk \
./bmake -f Makefile install \
prefix=/system \
BINDIR.bmake=/system/binaries \
SHAREDIR.bmake=/system/share \
MANDIR.bmake=/system/documentation/man-pages \
STRIP_FLAG=
/sources if you do not plan to rebuild bmake again.
Command Explanations
rm -rf bmakeandtar -xf: Recreate a clean bmake source tree.lbi_configure: Applies the book's/systeminstall layout.--with-default-sys-path=/system/share/mk: Sets the default makefile include path.--with-mksrc=mk: Points bmake at its bundledmkfiles.--with-filemon=noand--without-lua: Disable optional filemon and Lua support.make $LWI_MAKE_FLAGS: Builds bmake with shared make parallelism.MAKESYSPATH=mk ./bmake -f Makefile install: Uses the newly built bmake and bundled mk files for installation.BINDIR.bmake,SHAREDIR.bmake, andMANDIR.bmake: Install bmake files into the book's layout.