netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] samples/bpf: kbuild: add CONFIG_SAMPLE_BPF Kconfig
@ 2019-10-01 10:14 Björn Töpel
  2019-10-01 10:17 ` Björn Töpel
  2019-10-01 12:33 ` Masahiro Yamada
  0 siblings, 2 replies; 12+ messages in thread
From: Björn Töpel @ 2019-10-01 10:14 UTC (permalink / raw)
  To: netdev, ast, daniel
  Cc: Björn Töpel, linux-kbuild, bpf, yamada.masahiro

From: Björn Töpel <bjorn.topel@intel.com>

This commit makes it possible to build the BPF samples via a Kconfig
option, CONFIG_SAMPLE_BPF. Further, it fixes that samples/bpf/ could
not be built due to a missing samples/Makefile subdir-y entry, after
the introduction of commit 394053f4a4b3 ("kbuild: make single targets
work more correctly").

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
---
 samples/Kconfig  | 4 ++++
 samples/Makefile | 1 +
 2 files changed, 5 insertions(+)

diff --git a/samples/Kconfig b/samples/Kconfig
index c8dacb4dda80..054297ac89ad 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -169,4 +169,8 @@ config SAMPLE_VFS
 	  as mount API and statx().  Note that this is restricted to the x86
 	  arch whilst it accesses system calls that aren't yet in all arches.
 
+config SAMPLE_BPF
+	bool "BPF samples"
+	depends on HEADERS_INSTALL
+
 endif # SAMPLES
diff --git a/samples/Makefile b/samples/Makefile
index 7d6e4ca28d69..49aa2f7d044b 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -20,3 +20,4 @@ obj-$(CONFIG_SAMPLE_TRACE_PRINTK)	+= trace_printk/
 obj-$(CONFIG_VIDEO_PCI_SKELETON)	+= v4l/
 obj-y					+= vfio-mdev/
 subdir-$(CONFIG_SAMPLE_VFS)		+= vfs
+subdir-$(CONFIG_SAMPLE_BPF)		+= bpf
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-10-03 17:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 10:14 [PATCH bpf] samples/bpf: kbuild: add CONFIG_SAMPLE_BPF Kconfig Björn Töpel
2019-10-01 10:17 ` Björn Töpel
2019-10-01 12:33 ` Masahiro Yamada
2019-10-01 14:16   ` Björn Töpel
2019-10-02  1:48     ` Masahiro Yamada
2019-10-02  7:41       ` Björn Töpel
2019-10-02 23:14         ` Ivan Khoronzhuk
2019-10-03  6:28           ` Björn Töpel
2019-10-03 10:36             ` Masahiro Yamada
2019-10-03 10:50               ` Björn Töpel
2019-10-03 17:16                 ` Andrii Nakryiko
2019-10-03 17:37                   ` Björn Töpel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).