summaryrefslogtreecommitdiffstats
path: root/spl/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-04 17:24:33 +0900
committerTom Rini <trini@ti.com>2014-02-19 11:07:51 -0500
commit5fe6301a6ddac6b3b74e5d9aae9e28f6f264e799 (patch)
tree0ff8c538b3133ddddc1263b5c3a4c32f125e1126 /spl/Makefile
parent01072b44db66d31dc397ccccd1bf8ccf98e39094 (diff)
downloadtalos-obmc-uboot-5fe6301a6ddac6b3b74e5d9aae9e28f6f264e799.tar.gz
talos-obmc-uboot-5fe6301a6ddac6b3b74e5d9aae9e28f6f264e799.zip
kbuild: generate {spl, tpl}-autoconf.mk only when it is necessary
Before this commit, {spl,tpl}-autoconf.mk was always generated at the top Makefile even if SPL(TPL) build was not selected. This commit moves the build rule of {spl,tpl}-autoconf.mk from the top Makefile to spl/Makefile. It prevents unnecessary {spl,tpl}-autoconf.mk from being generated. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'spl/Makefile')
-rw-r--r--spl/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/spl/Makefile b/spl/Makefile
index 13612d3f8a..25f99212f3 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -50,6 +50,22 @@ endif
include $(TOPDIR)/config.mk
+# FIX ME
+c_flags := $(KBUILD_CFLAGS) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS)
+
+# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL)
+quiet_cmd_autoconf = GEN $@
+ cmd_autoconf = \
+ $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
+ sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
+ rm $@.tmp
+
+include/tpl-autoconf.mk: include/config.h
+ $(call cmd,autoconf)
+
+include/spl-autoconf.mk: include/config.h
+ $(call cmd,autoconf)
+
HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n)
ifdef CONFIG_SPL_START_S_PATH
OpenPOWER on IntegriCloud