* [ptxdist] [PATCH] libiio: Optionally install test binaries
@ 2019-01-16 22:18 Ladislav Michl
0 siblings, 0 replies; only message in thread
From: Ladislav Michl @ 2019-01-16 22:18 UTC (permalink / raw)
To: ptxdist
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
Note: replaces "libiio: Add options for installing test binaries"
rules/libiio.in | 15 +++++++++++++--
rules/libiio.make | 12 +++++++++---
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/rules/libiio.in b/rules/libiio.in
index c9e94c866..93ef298ec 100644
--- a/rules/libiio.in
+++ b/rules/libiio.in
@@ -1,9 +1,20 @@
## SECTION=system_libraries
-config LIBIIO
+menuconfig LIBIIO
tristate
- prompt "libiio"
+ prompt "libiio "
select HOST_CMAKE
help
A cross platform library for interfacing with local and
remote Linux IIO devices.
+
+if LIBIIO
+
+config LIBIIO_TEST_TOOLS
+ bool "install test tools"
+ help
+ Install IIO test tools: iio_adi_xflow_check, iio_attr,
+ iio_genxml, iio_info, iio_readdev, iio_reg and
+ iio_writedev.
+
+endif
diff --git a/rules/libiio.make b/rules/libiio.make
index c997ed4bd..997997fba 100644
--- a/rules/libiio.make
+++ b/rules/libiio.make
@@ -32,7 +32,7 @@ LIBIIO_LICENSE := LGPL-2.1-only
LIBIIO_CONF_TOOL := cmake
LIBIIO_CONF_OPT := \
$(CROSS_CMAKE_USR) \
- -DENABLE_IPV6=$(call ptx/ifdef, PTXCONF_GLOBAL_IPV6,ON,OFF) \
+ -DENABLE_IPV6=$(call ptx/onoff, PTXCONF_GLOBAL_IPV6) \
-DWITH_DOC=OFF \
-DWITH_IIOD=OFF \
-DWITH_LOCAL_BACKEND=ON \
@@ -44,7 +44,7 @@ LIBIIO_CONF_OPT := \
-DWITH_MATLAB_BINDINGS_API=OFF \
-DPYTHON_BINDINGS=OFF \
-DCSHARP_BINDINGS=OFF \
- -DWITH_TESTS=OFF
+ -DWITH_TESTS=$(call ptx/onoff, PTXCONF_LIBIIO_TEST_TOOLS)
# ----------------------------------------------------------------------------
# Target-Install
@@ -57,10 +57,16 @@ $(STATEDIR)/libiio.targetinstall:
@$(call install_fixup, libiio, PRIORITY, optional)
@$(call install_fixup, libiio, SECTION, base)
@$(call install_fixup, libiio, AUTHOR, "Ladislav Michl <ladis@linux-mips.org>")
- @$(call install_fixup, libiio, DESCRIPTION, missing)
+ @$(call install_fixup, libiio, DESCRIPTION, \
+ "A library for interfacing with Linux IIO devices")
@$(call install_lib, libiio, 0, 0, 0644, libiio)
+ifdef PTXCONF_LIBIIO_TEST_TOOLS
+ @$(foreach testprog, adi_xflow_check attr genxml info readdev reg writedev, \
+ $(call install_copy, libiio, 0, 0, 0755, -, \
+ /usr/bin/iio_$(testprog))$(ptx/nl))
+endif
@$(call install_finish, libiio)
@$(call touch)
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-16 22:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 22:18 [ptxdist] [PATCH] libiio: Optionally install test binaries Ladislav Michl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox