mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 22:23:55 +00:00
selftests/bpf: Improve bpftool changes detection
Detect when bpftool source code changes and trigger rebuild within selftests/bpf Makefile. Also fix few small formatting problems. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/bpf/20200124054148.2455060-1-andriin@fb.com
This commit is contained in:
parent
1a6fa10640
commit
03506297d2
@ -155,16 +155,17 @@ $(OUTPUT)/test_sysctl: cgroup_helpers.c
|
||||
|
||||
DEFAULT_BPFTOOL := $(SCRATCH_DIR)/sbin/bpftool
|
||||
BPFTOOL ?= $(DEFAULT_BPFTOOL)
|
||||
$(DEFAULT_BPFTOOL): $(BPFOBJ) | $(BUILD_DIR)/bpftool
|
||||
$(Q)$(MAKE) $(submake_extras) -C $(BPFTOOLDIR) \
|
||||
OUTPUT=$(BUILD_DIR)/bpftool/ \
|
||||
$(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile) \
|
||||
$(BPFOBJ) | $(BUILD_DIR)/bpftool
|
||||
$(Q)$(MAKE) $(submake_extras) -C $(BPFTOOLDIR) \
|
||||
OUTPUT=$(BUILD_DIR)/bpftool/ \
|
||||
prefix= DESTDIR=$(SCRATCH_DIR)/ install
|
||||
|
||||
$(BPFOBJ): $(wildcard $(BPFDIR)/*.c $(BPFDIR)/*.h $(BPFDIR)/Makefile) \
|
||||
$(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \
|
||||
../../../include/uapi/linux/bpf.h \
|
||||
| $(INCLUDE_DIR) $(BUILD_DIR)/libbpf
|
||||
$(Q)$(MAKE) $(submake_extras) -C $(BPFDIR) OUTPUT=$(BUILD_DIR)/libbpf/ \
|
||||
DESTDIR=$(SCRATCH_DIR) prefix= all install_headers
|
||||
DESTDIR=$(SCRATCH_DIR) prefix= all install_headers
|
||||
|
||||
$(BUILD_DIR)/libbpf $(BUILD_DIR)/bpftool $(INCLUDE_DIR):
|
||||
$(call msg,MKDIR,,$@)
|
||||
|
Loading…
Reference in New Issue
Block a user