sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 19 Feb 2018 17:09:42 +0000 (02:09 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 2 Mar 2018 00:20:55 +0000 (09:20 +0900)
If CONFIG_USE_BUILTIN_DTB is enabled, but CONFIG_BUILTIN_DTB_SOURCE
is empty (for example, allmodconfig), it fails to build, like this:

  make[2]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o',
  needed by 'arch/sh/boot/dts/built-in.o'.  Stop.

Surround obj-y with ifneq ... endif.

I replaced $(CONFIG_USE_BUILTIN_DTB) with 'y' since this is always
the case from the following code from arch/sh/Makefile:

  core-$(CONFIG_USE_BUILTIN_DTB)  += arch/sh/boot/dts/

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/sh/boot/dts/Makefile

index 715def00a436c21a1822e18251b83f6afe86941a..01d0f7fb14cce7b8e0afc17798d6cc8a1d2938d1 100644 (file)
@@ -1 +1,3 @@
-obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
+ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"")
+obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o
+endif