bpf: makefiles: Do not generate empty vmlinux.h
authorChangbin Du <changbin.du@gmail.com>
Sat, 17 Dec 2022 22:35:09 +0000 (06:35 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 21 Dec 2022 00:09:39 +0000 (16:09 -0800)
commite7f0d5cdd023d8fa53d9ca541b9a55f0eb45618c
treede49f97a208943fa022a576c99a155dff69f46fd
parente6b4e1d759d3bfb7cb84c87cc8f1858da7db8dea
bpf: makefiles: Do not generate empty vmlinux.h

Remove the empty vmlinux.h if bpftool failed to dump btf info.
The empty vmlinux.h can hide real error when reading output
of make.

This is done by adding .DELETE_ON_ERROR special target in related
makefiles.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20221217223509.88254-3-changbin.du@gmail.com
tools/bpf/bpftool/Makefile
tools/testing/selftests/bpf/Makefile