mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
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>
This commit is contained in:
parent
01072b44db
commit
5fe6301a6d
2 changed files with 16 additions and 23 deletions
23
Makefile
23
Makefile
|
@ -890,9 +890,6 @@ tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend scripts_basic
|
||||||
# Explicitly make _depend in subdirs containing multiple targets to prevent
|
# Explicitly make _depend in subdirs containing multiple targets to prevent
|
||||||
# parallel sub-makes creating .depend files simultaneously.
|
# parallel sub-makes creating .depend files simultaneously.
|
||||||
depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \
|
depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \
|
||||||
include/spl-autoconf.mk \
|
|
||||||
include/tpl-autoconf.mk \
|
|
||||||
include/autoconf.mk \
|
|
||||||
include/generated/generic-asm-offsets.h \
|
include/generated/generic-asm-offsets.h \
|
||||||
include/generated/asm-offsets.h
|
include/generated/asm-offsets.h
|
||||||
|
|
||||||
|
@ -974,26 +971,6 @@ quiet_cmd_autoconf = GEN $@
|
||||||
include/autoconf.mk: include/config.h
|
include/autoconf.mk: include/config.h
|
||||||
$(call cmd,autoconf)
|
$(call cmd,autoconf)
|
||||||
|
|
||||||
# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL)
|
|
||||||
quiet_cmd_tpl-autoconf = GEN $@
|
|
||||||
cmd_tpl-autoconf = \
|
|
||||||
$(CPP) $(c_flags) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\
|
|
||||||
-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,tpl-autoconf)
|
|
||||||
|
|
||||||
quiet_cmd_spl-autoconf = GEN $@
|
|
||||||
cmd_spl-autoconf = \
|
|
||||||
$(CPP) $(c_flags) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \
|
|
||||||
sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \
|
|
||||||
rm $@.tmp
|
|
||||||
|
|
||||||
include/spl-autoconf.mk: include/config.h
|
|
||||||
$(call cmd,spl-autoconf)
|
|
||||||
|
|
||||||
quiet_cmd_offsets = GEN $@
|
quiet_cmd_offsets = GEN $@
|
||||||
cmd_offsets = $(srctree)/tools/scripts/make-asm-offsets $< $@
|
cmd_offsets = $(srctree)/tools/scripts/make-asm-offsets $< $@
|
||||||
|
|
||||||
|
|
16
spl/Makefile
16
spl/Makefile
|
@ -50,6 +50,22 @@ endif
|
||||||
|
|
||||||
include $(TOPDIR)/config.mk
|
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)
|
HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n)
|
||||||
|
|
||||||
ifdef CONFIG_SPL_START_S_PATH
|
ifdef CONFIG_SPL_START_S_PATH
|
||||||
|
|
Loading…
Add table
Reference in a new issue