Skip to content

Commit

Permalink
Makefile: have "all" target depend on "bootstrap" target to make and …
Browse files Browse the repository at this point in the history
…gawk locally built in expected 4.2.1 versions.

This applies to 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 13a12d1 commit 4e57d3f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 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 @@ -143,6 +143,9 @@ all linux cpio run: $(HEADS_GAWK)
bootstrap: $(HEADS_GAWK)
endif

#We want to make sure we build bootstrap target if needed.
all: bootstrap;

BOARD ?= qemu-coreboot
CONFIG := $(pwd)/boards/$(BOARD)/$(BOARD).config

Expand Down

0 comments on commit 4e57d3f

Please sign in to comment.