Skip to content

Commit

Permalink
Makefile: have HEADS_GAWK depend on locally built HEADS_MAKE if make …
Browse files Browse the repository at this point in the history
…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 linuxboot#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 linuxboot#936 (comment) 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)
  • Loading branch information
tlaurion committed Mar 2, 2022
1 parent a3b058d commit 9f062ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) $@
Expand Down

0 comments on commit 9f062ae

Please sign in to comment.