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
--buildis 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 headergnumake.hto/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:
- It adds
-std=gnu99to the chroot’s release flags, whose own standard is-std=gnu11. The bootstrap build already compiles asgnu99, the standardscript/env/host.envsets. - It passes no
--disable-nls. The package still ships no translations, because kpkg’s size and language policy prunes every non-English message catalogue from it.
See also
- GCC, the step before this one, and kpkg, the step after it
- The make port: its version, source and contents
- The phase environment: the flags a host step and a chroot step each compile with