summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-01-15 20:02:31 +0100
committerSam Ravnborg <sam@mars.ravnborg.org>2006-01-15 20:02:31 +0100
commit296e0855b0f9a4ec9be17106ac541745a55b2ce1 (patch)
treeb918bb866edc339d51b2b71176265f6d424600e7
parent60f33b80443a3e7e79e2a3ddc625ab6246a61d3d (diff)
downloadlinux-296e0855b0f9a4ec9be17106ac541745a55b2ce1.tar.bz2
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>
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index deedaf79cdca..b3dd9dbdc29e 100644
--- a/Makefile
+++ b/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