Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

27. Make

GNU make reads a makefile and runs the commands that bring its targets up to date. Almost every upstream build ends in a call to make, including every port 20_selfhost builds. 110_make.sh cross-compiles make from the make port’s source tarball and installs it into build/fs, so the root has it once the container’s own make is out of reach.

Source: the archive of the make port
Installs into: build/fs/usr
Approximate build time: 0.1 SBU

Installation of make

The step unpacks the port’s tarball and builds in a build directory inside it:

MAKE_SRC=$(extract_port_source make)

cd "$MAKE_SRC"
mkdir -p build && cd build

../configure \
    --host=$KDOS_TARGET \
    --prefix=/usr \
    --disable-nls \
    --without-guile

make
make DESTDIR=$SYSROOT install

script/phases/10_bootstrap/110_make.sh, lines 24–36

The meaning of the configure options

--host=$KDOS_TARGET
Build for KDOS with the cross compiler. No --build is given, so configure decides for itself whether it is cross-compiling, and concludes it is not (see Part III).
--prefix=/usr
The program goes to /usr/bin/make, its header gnumake.h to /usr/include.
--disable-nls
Build no message catalogues.
--without-guile
Build make without GNU Guile, the Scheme interpreter it can embed for $(guile …) in makefiles. The root has no Guile, and naming the switch keeps configure from looking for one.

The step then removes the source and touches build/mark/bootstrap/make.

Built again later

30_foundation installs the make port in its opening run of build tools, which adopts /usr/bin/make. The port passes --prefix=/usr and --without-guile as this step does, with two differences:

See also