mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
kbuild: fix make -jN with multiple targets with O=...
The way multiple targets was handled with make O=... broke because for each high-level target make spawned a parallel make resulting in a broken build. Reported by Keith Owens <kaos@ocs.com.au> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
60f33b8044
commit
296e0855b0
1 changed files with 4 additions and 3 deletions
7
Makefile
7
Makefile
|
@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
|
|||
$(if $(KBUILD_OUTPUT),, \
|
||||
$(error output directory "$(saved-output)" does not exist))
|
||||
|
||||
.PHONY: $(MAKECMDGOALS)
|
||||
.PHONY: $(MAKECMDGOALS) cdbuilddir
|
||||
$(MAKECMDGOALS) _all: cdbuilddir
|
||||
|
||||
$(filter-out _all,$(MAKECMDGOALS)) _all:
|
||||
cdbuilddir:
|
||||
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
|
||||
KBUILD_SRC=$(CURDIR) \
|
||||
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
|
||||
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS)
|
||||
|
||||
# Leave processing to above invocation of make
|
||||
skip-makefile := 1
|
||||
|
|
Loading…
Reference in a new issue