Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: boot: fix build rule of vmlinux.its.S

As Documentation/kbuild/makefile.txt says, it is a typical mistake
to forget the FORCE prerequisite for the rule invoked by if_changed.

Add the FORCE to the prerequisite, but it must be filtered-out from
the files passed to the 'cat' command. Because this rule generates
.vmlinux.its.S.cmd, vmlinux.its.S must be specified as targets so
that the .cmd file is included.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Patchwork: https://patchwork.linux-mips.org/patch/19097/
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org

authored by

Masahiro Yamada and committed by
Paul Burton
67e09db5 321f95b6

+5 -3
+5 -3
arch/mips/boot/Makefile
··· 118 118 itb_addr_cells = 2 119 119 endif 120 120 121 - quiet_cmd_its_cat = CAT $@ 122 - cmd_its_cat = cat $^ >$@ 121 + targets += vmlinux.its.S 123 122 124 - $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) 123 + quiet_cmd_its_cat = CAT $@ 124 + cmd_its_cat = cat $(filter-out $(PHONY), $^) >$@ 125 + 126 + $(obj)/vmlinux.its.S: $(addprefix $(srctree)/arch/mips/$(PLATFORM)/,$(ITS_INPUTS)) FORCE 125 127 $(call if_changed,its_cat) 126 128 127 129 quiet_cmd_cpp_its_S = ITS $@