8.33. GNU Make stage 2 4.4.1
Rebuild GNU Make in the final target environment so target package builds use the finalized `make` and `gmake` binaries.
Input assumption: make-4.4.1.tar.gz is already present in /sources from the chapter 4 source staging step.
Source URL: https://gnu.mirror.constant.com/make/make-4.4.1.tar.gz
Upstream build note: GNU Make release tarballs ship a generated configure script and follow the standard ./configure, make, make install build flow.
Licenses:
- GPL-3.0-or-later
Dependencies:
- musl (libc)
- clang
- make
GNU Make is a Makefile build orchestration tool. we need it to provide the finalized target make and gmake commands for chapter 8 and later native package builds.
Extract and Enter the Source Tree
cd /sources
rm -rf make-4.4.1
tar -xf make-4.4.1.tar.gz
cd make-4.4.1
Configure GNU Make
CC=clang \
CFLAGS="$LWI_CFLAGS" \
LDFLAGS="$LBI_CUSTOM_LDFLAGS" \
lbi_configure \
--without-guile \
--disable-nls
Build GNU Make
make $LWI_MAKE_FLAGS
Install GNU Make
make install
ln -sf make /system/binaries/gmake
Command Explanations
rm -rf make-...andtar -xf: Recreate a clean GNU Make source tree.CC=clang,CFLAGS, andLDFLAGS: Configure with the final target compiler and local tuning variables.lbi_configure: Applies the book's/systeminstall layout.--without-guile: Disables optional Guile integration.--disable-nls: Avoids gettext/native language support for this build.make $LWI_MAKE_FLAGSandmake install: Build and install GNU Make.ln -sf make /system/binaries/gmake: Provides the commongmakealias.