summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2013-03-27 14:34:18 +0000
committerTom Rini <trini@ti.com>2013-04-02 16:23:34 -0400
commitb343bbb528249391335cf35ca10c8822310cd815 (patch)
tree01115e092f284dfa0418f58cf98760ff8520c6c5
parent60d7d5a63189c9f77a190c9965861dc15482c2d0 (diff)
downloadu-boot-imx-b343bbb528249391335cf35ca10c8822310cd815.zip
u-boot-imx-b343bbb528249391335cf35ca10c8822310cd815.tar.gz
u-boot-imx-b343bbb528249391335cf35ca10c8822310cd815.tar.bz2
build: Fix make errors generated when building 'distclean'
It was noticed that when `make distclean' is run, the make process terminates with error reporting something like: rm: cannot remove '/tmp/foobar/': Is a directory make: *** [clobber] Error 1 The problem is that the list of files targeted for removal includes a directory in case CONFIG_SPL_TARGET is not set. The fix has been tested as follows: Ran several times the following sequence of commands: CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make O=/tmp/foobar smdk5250_config CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- make O=/tmp/foobar distclean it did not cause an error, it used to before this change. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d60a14b..e1280cb 100644
--- a/Makefile
+++ b/Makefile
@@ -406,8 +406,10 @@ ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin
ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin
ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin
-ALL-$(CONFIG_SPL) += $(obj)$(subst ",,$(CONFIG_SPL_TARGET))
ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin
+ifneq ($(CONFIG_SPL_TARGET),)
+ALL-$(CONFIG_SPL) += $(obj)$(subst ",,$(CONFIG_SPL_TARGET))
+endif
# enable combined SPL/u-boot/dtb rules for tegra
ifneq ($(CONFIG_TEGRA),)