summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-04 17:24:41 +0900
committerTom Rini <trini@ti.com>2014-02-19 11:10:04 -0500
commit53bca5ab6a4fd561dfae0a3b72d709feda2260f3 (patch)
treebb0498256e969fd81222cb83391303c906d46bb4 /Makefile
parentefcf861931f987d82b11caed75b8c2ad9d709274 (diff)
downloadu-boot-imx-53bca5ab6a4fd561dfae0a3b72d709feda2260f3.zip
u-boot-imx-53bca5ab6a4fd561dfae0a3b72d709feda2260f3.tar.gz
u-boot-imx-53bca5ab6a4fd561dfae0a3b72d709feda2260f3.tar.bz2
kbuild: support simultaneous board configuration and "make all"
This commit fixes two problems: [1] We could not do board configuration and "make all" in one command line. For example, the following did not work as we expect: $ make sandbox_config all Configuring for sandbox board... make: Nothing to be done for `all'. [2] mixed-target build did not work with -j option For example, the following did not work: $ make -j8 sandbox_config u-boot Makefile:481: *** "System not configured - see README". Stop. make: *** [u-boot] Error 2 make: *** Waiting for unfinished jobs.... Configuring for sandbox board... Going forward, we can do $ make -j8 sandbox_config all This is the same as $ make sandbox_config $ make -j8 Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1caa9f1..0fcae83 100644
--- a/Makefile
+++ b/Makefile
@@ -428,8 +428,16 @@ ifeq ($(mixed-targets),1)
# We're called with mixed targets (*config and build targets).
# Handle them one by one.
-%:: FORCE
- $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@
+PHONY += $(MAKECMDGOALS) build-one-by-one
+
+$(MAKECMDGOALS): build-one-by-one
+ @:
+
+build-one-by-one:
+ $(Q)set -e; \
+ for i in $(MAKECMDGOALS); do \
+ $(MAKE) -f $(srctree)/Makefile $$i; \
+ done
else
ifeq ($(config-targets),1)