From 9f062ae01a36cc727065aa1367915661c65fd454 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Wed, 2 Mar 2022 09:09:08 -0500 Subject: [PATCH] Makefile: have HEADS_GAWK depend on locally built HEADS_MAKE if make and gawk are not found in expected 4.2.1 versions. This will be the case on debian-11 and other newer OSes. Fixes a bug where "make BOARD=xyz bootstrap" was needed prior of being able to build anything else otherwise HEADS_GAWK was expecting HEADS_MAKE to be built already, which was not the case. (fixes #1126) As of now, I do not see any OS make/gawk being used anymore. All modules except coreboot (which uses coreboot buildstack), including musl-cross-make, are being built with local make and local gawk. Improves https://github.com/osresearch/heads/issues/936#issuecomment-746693146 which showed that local make (/usb/bin/make, /usr/local/bin/make, /usr/sbin/make, /usr/local/sbin/make and /usr/bin/gawk were called locally. To redo) --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6ac87a37e..6750aee07 100644 --- a/Makefile +++ b/Makefile @@ -91,9 +91,9 @@ $(HEADS_MAKE): $(build)/$(make_dir)/.configured # Once we have a proper Make, we can just pass arguments into it all linux cpio run: $(HEADS_MAKE) - LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $(MAKE_JOBS) $@ + LANG=C MAKE=$(HEADS_MAKE) $(MAKE_JOBS) $@ %.clean %.vol %.menuconfig: $(HEADS_MAKE) - LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@ + LANG=C MAKE=$(HEADS_MAKE) $@ bootstrap: $(HEADS_MAKE) endif @@ -135,7 +135,7 @@ $(HEADS_GAWK): $(build)/$(gawk_dir)/.configured $(VERBOSE_REDIRECT) # Once we have a suitable version of gawk, we can rerun make -all linux cpio run: $(HEADS_GAWK) +all linux cpio run: $(HEADS_MAKE) $(HEADS_GAWK) LANG=C HEADS_GAWK=$(HEADS_GAWK) $(MAKE) $(MAKE_JOBS) $@ %.clean %.vol %.menuconfig: $(HEADS_GAWK) LANG=C HEADS_GAWK=$(HEADS_GAWK) $(MAKE) $@