diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2013-10-21 11:53:41 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-11-01 11:42:13 -0400 |
commit | 3bddafaab42af50f2a6ae080c425e157906d9387 (patch) | |
tree | 615fafa513a9ad2785760a69b54309e9862f9b95 /Makefile | |
parent | bcfe8fdf321e5e6d9931502c903348fe81252dd0 (diff) | |
download | u-boot-imx-3bddafaab42af50f2a6ae080c425e157906d9387.zip u-boot-imx-3bddafaab42af50f2a6ae080c425e157906d9387.tar.gz u-boot-imx-3bddafaab42af50f2a6ae080c425e157906d9387.tar.bz2 |
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 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 6 insertions, 32 deletions
@@ -559,32 +559,16 @@ ifeq ($(CONFIG_KALLSYMS),y) $(GEN_UBOOT) $(obj)common/system_map.o endif -# 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 $(OBJS) explicitly. -# It is built while we are at $(CPUDIR)/lib$(CPU).o build. -$(OBJS): depend - if grep -q "^include" $(CPUDIR)/Makefile; then \ - $(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@)); \ - fi +$(OBJS): + @: $(LIBS): depend $(SUBDIR_TOOLS) - +$(call select_makefile, $(dir $(subst $(obj),,$@))) + $(MAKE) $(build) $(dir $(subst $(obj),,$@)) + mv $(dir $@)built-in.o $@ $(LIBBOARD): depend $(LIBS) - +$(call select_makefile, $(dir $(subst $(obj),,$@))) + $(MAKE) $(build) $(dir $(subst $(obj),,$@)) + mv $(dir $@)built-in.o $@ $(SUBDIRS): depend $(MAKE) -C $@ all @@ -612,13 +596,6 @@ $(obj)tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend updater: $(MAKE) -C tools/updater all -select_makefile2 = \ - if grep -q "^include" $1/Makefile; then \ - $(MAKE) -C $1 _depend; \ - else \ - $(MAKE) -C $1 -f $(TOPDIR)/scripts/Makefile.build _depend; \ - fi - # Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ @@ -627,9 +604,6 @@ depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ $(obj)include/autoconf.mk \ $(obj)include/generated/generic-asm-offsets.h \ $(obj)include/generated/asm-offsets.h - +for dir in $(SUBDIRS) $(CPUDIR) $(LDSCRIPT_MAKEFILE_DIR) ; do \ - $(call select_makefile2, $$dir); \ - done TAG_SUBDIRS = $(SUBDIRS) TAG_SUBDIRS += $(dir $(__LIBS)) |