kbuild: add FORCE to dependency of $(obj)/dts/dt-platdata.o
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 17 Apr 2020 07:21:35 +0000 (16:21 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 20:40:09 +0000 (16:40 -0400)
if_changed must have FORCE as a prerequisite.

Add $(obj)/dts/dt-platdata.o to 'targets' so that the corresponding
.cmd file is included.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/Makefile.spl

index 5384f212783090818bc60922daece5a94e15e63a..4c2c0567c57ed7d96617971b6f59e0170bf19260 100644 (file)
@@ -307,10 +307,11 @@ quiet_cmd_dtoch = DTOC H  $@
 cmd_dtoch = $(pythonpath) $(srctree)/tools/dtoc/dtoc -d $(obj)/$(SPL_BIN).dtb -o $@ struct
 
 quiet_cmd_plat = PLAT    $@
-cmd_plat = $(CC) $(c_flags) -c $< -o $@
+cmd_plat = $(CC) $(c_flags) -c $< -o $(filter-out $(PHONY),$@)
 
+targets += $(obj)/dts/dt-platdata.o
 $(obj)/dts/dt-platdata.o: $(obj)/dts/dt-platdata.c \
-               include/generated/dt-structs-gen.h
+               include/generated/dt-structs-gen.h FORCE
        $(call if_changed,plat)
 
 PHONY += dts_dir