Commit 251987a8 authored by Vasily Gorbik's avatar Vasily Gorbik Committed by Martin Schwidefsky

s390/build: add *.o.chkbss files to targets list

Adding *.o.chkbss files to targets list makes sure that the kbuild is
aware of them and removes them during make clean.

Also remove *.o.chkbss file before an actual check, to avoid having
stale *.o.chkbss file left even if the check is failed.
Acked-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 7e0363b4
......@@ -2,6 +2,7 @@
quiet_cmd_chkbss = CHKBSS $<
define cmd_chkbss
rm -f $@; \
if ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \
echo "error: $< .bss section is not empty" >&2; exit 1; \
fi; \
......@@ -10,10 +11,13 @@ endef
chkbss-target ?= $(obj)/built-in.a
ifneq (,$(findstring /,$(chkbss)))
$(chkbss-target): $(patsubst %, %.chkbss, $(chkbss))
chkbss-files := $(patsubst %, %.chkbss, $(chkbss))
else
$(chkbss-target): $(patsubst %, $(obj)/%.chkbss, $(chkbss))
chkbss-files := $(patsubst %, $(obj)/%.chkbss, $(chkbss))
endif
$(chkbss-target): $(chkbss-files)
targets += $(notdir $(chkbss-files))
%.o.chkbss: %.o
$(call cmd,chkbss)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment