remarkable-linux/arch/mips/Makefile.postlink
Matt Redfearn 6e5b95cdbd MIPS: Fix distclean with Makefile.postlink
The postlink Makefile must include include/config/auto.conf to get the
kernel configuration variables. But in a clean kernel directory this
file does not exist, causing make to bail with the error:

arch/mips/Makefile.postlink:10: include/config/auto.conf: No such file or directory
make[1]: *** No rule to make target 'include/config/auto.conf'.  Stop.
Makefile:1290: recipe for target 'vmlinuxclean' failed

Fix this by using "-include" to not cause a Make error when the file
does not exist.

Fixes: 44079d3509 ("MIPS: Use Makefile.postlink to insert relocations into vmlinux")
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15136/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
2017-02-13 18:57:34 +00:00

36 lines
656 B
Makefile

# ===========================================================================
# Post-link MIPS pass
# ===========================================================================
#
# 1. Insert relocations into vmlinux
PHONY := __archpost
__archpost:
-include include/config/auto.conf
include scripts/Kbuild.include
CMD_RELOCS = arch/mips/boot/tools/relocs
quiet_cmd_relocs = RELOCS $@
cmd_relocs = $(CMD_RELOCS) $@
# `@true` prevents complaint when there is nothing to be done
vmlinux: FORCE
@true
ifeq ($(CONFIG_RELOCATABLE),y)
$(call if_changed,relocs)
endif
%.ko: FORCE
@true
clean:
@true
PHONY += FORCE clean
FORCE:
.PHONY: $(PHONY)