* [PATCH net-next v1] bpf: Rebuild bpf.o for any dependency update
@ 2017-02-11 22:20 Mickaël Salaün
2017-02-15 17:16 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Mickaël Salaün @ 2017-02-11 22:20 UTC (permalink / raw)
To: linux-kernel
Cc: Mickaël Salaün, Alexei Starovoitov, Daniel Borkmann,
David S . Miller, Wang Nan, netdev
This is needed to force a rebuild of bpf.o when one of its dependencies
(e.g. uapi/linux/bpf.h) is updated.
Add a phony target.
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David S. Miller <davem@davemloft.net>
Cc: Wang Nan <wangnan0@huawei.com>
---
tools/testing/selftests/bpf/Makefile | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index a35f564f66a1..c7816fe60feb 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,13 +1,24 @@
-CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I../../../lib
+LIBDIR := ../../../lib
+BPFOBJ := $(LIBDIR)/bpf/bpf.o
+
+CFLAGS += -Wall -O2 -lcap -I../../../include/uapi -I$(LIBDIR)
test_objs = test_verifier test_tag test_maps test_lru_map test_lpm_map
TEST_PROGS := $(test_objs) test_kmod.sh
TEST_FILES := $(test_objs)
+.PHONY: all clean force
+
all: $(test_objs)
-$(test_objs): ../../../lib/bpf/bpf.o
+# force a rebuild of BPFOBJ when its dependencies are updated
+force:
+
+$(BPFOBJ): force
+ $(MAKE) -C $(dir $(BPFOBJ))
+
+$(test_objs): $(BPFOBJ)
include ../lib.mk
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v1] bpf: Rebuild bpf.o for any dependency update
2017-02-11 22:20 [PATCH net-next v1] bpf: Rebuild bpf.o for any dependency update Mickaël Salaün
@ 2017-02-15 17:16 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-15 17:16 UTC (permalink / raw)
To: mic; +Cc: linux-kernel, ast, daniel, wangnan0, netdev
From: Mickaël Salaün <mic@digikod.net>
Date: Sat, 11 Feb 2017 23:20:23 +0100
> This is needed to force a rebuild of bpf.o when one of its dependencies
> (e.g. uapi/linux/bpf.h) is updated.
>
> Add a phony target.
>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-15 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-11 22:20 [PATCH net-next v1] bpf: Rebuild bpf.o for any dependency update Mickaël Salaün
2017-02-15 17:16 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.