From: Masahiro Yamada <yamada.m@jp.panasonic.com>
Date: Mon, 31 Mar 2014 08:33:51 +0000 (+0900)
Subject: Kbuild: allow building tools without board configuration
X-Git-Tag: v2025.01-rc5-pxa1908~15433^2~15
X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=4642e0022b648968c994551b087a780327079883;p=u-boot.git

Kbuild: allow building tools without board configuration

Prior to Kbuild, U-Boot could build under tools/ directory
withour configuring for a specific board.

That feature was lost when switching to Kbuild.

This patch revives it again by adding a make target "tools-only".

Usage:
  $ make tools-only

Neither board configuration nor cross compiler are required to
build host tools.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Acked-by: Alexey Brodkin <abrodkin@synopsys.com>
---

diff --git a/Makefile b/Makefile
index e5f5a8cdc2..43391eb15d 100644
--- a/Makefile
+++ b/Makefile
@@ -409,7 +409,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h
 
 no-dot-config-targets := clean clobber mrproper distclean \
 			 help %docs check% coccicheck \
-			 ubootversion backup
+			 ubootversion backup tools-only
 
 config-targets := 0
 mixed-targets  := 0
@@ -1128,6 +1128,9 @@ checkarmreloc: u-boot
 env: scripts_basic
 	$(Q)$(MAKE) $(build)=tools/$@
 
+tools-only: scripts_basic $(version_h) $(timestamp_h)
+	$(Q)$(MAKE) $(build)=tools
+
 tools-all: export HOST_TOOLS_ALL=y
 tools-all: env tools ;