diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-01-15 14:02:31 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-01-15 14:02:31 -0500 |
commit | 296e0855b0f9a4ec9be17106ac541745a55b2ce1 (patch) | |
tree | b918bb866edc339d51b2b71176265f6d424600e7 | |
parent | 60f33b80443a3e7e79e2a3ddc625ab6246a61d3d (diff) |
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-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) | |||
106 | $(if $(KBUILD_OUTPUT),, \ | 106 | $(if $(KBUILD_OUTPUT),, \ |
107 | $(error output directory "$(saved-output)" does not exist)) | 107 | $(error output directory "$(saved-output)" does not exist)) |
108 | 108 | ||
109 | .PHONY: $(MAKECMDGOALS) | 109 | .PHONY: $(MAKECMDGOALS) cdbuilddir |
110 | $(MAKECMDGOALS) _all: cdbuilddir | ||
110 | 111 | ||
111 | $(filter-out _all,$(MAKECMDGOALS)) _all: | 112 | cdbuilddir: |
112 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ | 113 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ |
113 | KBUILD_SRC=$(CURDIR) \ | 114 | KBUILD_SRC=$(CURDIR) \ |
114 | KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@ | 115 | KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS) |
115 | 116 | ||
116 | # Leave processing to above invocation of make | 117 | # Leave processing to above invocation of make |
117 | skip-makefile := 1 | 118 | skip-makefile := 1 |