summaryrefslogtreecommitdiff
path: root/spl
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2013-10-21 11:53:41 +0900
committerTom Rini <trini@ti.com>2013-11-01 11:42:13 -0400
commit3bddafaab42af50f2a6ae080c425e157906d9387 (patch)
tree615fafa513a9ad2785760a69b54309e9862f9b95 /spl
parentbcfe8fdf321e5e6d9931502c903348fe81252dd0 (diff)
Makefile: convert makefiles to Kbuild style and delete grep switch
We have converted all makefiles needed to build $(LIBS). Until this commit we used to grep switch so that U-Boot style and Kbuild style makefiles coexist. But we do not need any more. Goint forward, use always Kbuild style Makefile when adding a new Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'spl')
-rw-r--r--spl/Makefile25
1 files changed, 4 insertions, 21 deletions
diff --git a/spl/Makefile b/spl/Makefile
index bf7271d2be5..cbd3d278491 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -190,29 +190,12 @@ GEN_UBOOT = \
$(obj)$(SPL_BIN): depend $(START) $(LIBS) $(obj)u-boot-spl.lds
$(GEN_UBOOT)
-# Tentative step for Kbuild-style makefiles coexist with conventional U-Boot style makefiles
-# U-Boot conventional sub makefiles always include some other makefiles.
-# So, the build system searches a line beginning with "include" before entering into the sub makefile
-# in order to distinguish which style it is.
-# If the Makefile include a "include" line, we assume it is an U-Boot style makefile.
-# Otherwise, it is treated as a Kbuild-style makefile.
-select_makefile = \
- if grep -q "^include" $1/Makefile; then \
- $(MAKE) -C $1; \
- else \
- $(MAKE) -C $1 -f $(TOPDIR)/scripts/Makefile.build; \
- mv $(dir $@)built-in.o $@; \
- fi
-
-# We do not need to build $(START) explicitly.
-# It is built while we are at $(CPUDIR)/lib$(CPU).o build.
-$(START): depend
- if grep -q "^include" $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))Makefile; then \
- $(MAKE) -C $(SRCTREE)/$(START_PATH) $@; \
- fi
+$(START):
+ @:
$(LIBS): depend
- +$(call select_makefile, $(SRCTREE)$(dir $(subst $(SPLTREE),,$@)))
+ $(MAKE) $(build) $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))
+ mv $(dir $@)built-in.o $@
$(obj)u-boot-spl.lds: $(LDSCRIPT) depend
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@