samples: kdbus: build kdbus-workers conditionally
authorDaniel Mack <daniel@zonque.org>
Tue, 31 Mar 2015 13:11:34 +0000 (15:11 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 25 Jul 2019 13:50:10 +0000 (15:50 +0200)
Give the kdbus sample its own config switch and only build it if it's
explicitly switched on.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reported-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paul Osmialowski <p.osmialowsk@samsung.com>
samples/Kconfig
samples/kdbus/Makefile

index 9cb63188d3ef2f18d6739068859c2dbe48853b7d..c7d54862a55ad51bd370bfbdbe21bf3b9dd7c934 100644 (file)
@@ -62,6 +62,13 @@ config SAMPLE_KDB
          Build an example of how to dynamically add the hello
          command to the kdb shell.
 
+config SAMPLE_KDBUS
+       bool "Build kdbus API example"
+       depends on KDBUS
+       help
+         Build an example of how the kdbus API can be used from
+         userspace.
+
 config SAMPLE_RPMSG_CLIENT
        tristate "Build rpmsg client sample -- loadable modules only"
        depends on RPMSG && m
index e714602b62608c8c877817ecd35e93f94782e0e3..137f8427209946406994f25841ae128c59bea4c1 100644 (file)
@@ -1,7 +1,7 @@
 # kbuild trick to avoid linker error. Can be omitted if a module is built.
 obj- := dummy.o
 
-hostprogs-y += kdbus-workers
+hostprogs-$(CONFIG_SAMPLE_KDBUS) += kdbus-workers
 
 always := $(hostprogs-y)