mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] libiio: Add options for installing test binaries
Date: Mon, 14 Jan 2019 10:50:56 +0100	[thread overview]
Message-ID: <20190114095056.GB11361@lenoch> (raw)
In-Reply-To: <20190114095005.GA11361@lenoch>

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 rules/libiio.in   | 29 +++++++++++++++++++++++++++--
 rules/libiio.make | 20 ++++++++++++++++++--
 2 files changed, 45 insertions(+), 4 deletions(-)

diff --git a/rules/libiio.in b/rules/libiio.in
index c9e94c866..b1d8f9038 100644
--- a/rules/libiio.in
+++ b/rules/libiio.in
@@ -1,9 +1,34 @@
 ## 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_ADI_XFLOW_CHECK
+	bool "install iio_adi_xflow_check"
+
+config LIBIIO_ATTR
+	bool "install iio_attr"
+
+config LIBIIO_GENXML
+	bool "install iio_genxml"
+
+config LIBIIO_INFO
+	bool "install iio_info"
+
+config LIBIIO_READDEV
+	bool "install iio_readdev"
+
+config LIBIIO_REG
+	bool "install iio_reg"
+
+config LIBIIO_WRITEDEV
+	bool "install iio_writedev"
+
+endif
diff --git a/rules/libiio.make b/rules/libiio.make
index c997ed4bd..2a621eae7 100644
--- a/rules/libiio.make
+++ b/rules/libiio.make
@@ -29,10 +29,23 @@ LIBIIO_LICENSE	:= LGPL-2.1-only
 # Prepare
 # ----------------------------------------------------------------------------
 
+LIBIIO_TESTS-y					:=
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_ADI_XFLOW_CHECK)	+= iio_adi_xflow_check
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_ATTR)		+= iio_attr
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_GENXML)		+= iio_genxml
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_INFO)		+= iio_info
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_READDEV)		+= iio_readdev
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_REG)		+= iio_reg
+LIBIIO_TESTS-$(PTXCONF_LIBIIO_WRITEDEV)		+= iio_writedev
+
+ifneq ($(strip $(LIBIIO_TESTS-y)),)
+LIBIIO_TESTS := y
+endif
+
 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 +57,7 @@ LIBIIO_CONF_OPT		:= \
 	-DWITH_MATLAB_BINDINGS_API=OFF \
 	-DPYTHON_BINDINGS=OFF \
 	-DCSHARP_BINDINGS=OFF \
-	-DWITH_TESTS=OFF
+	-DWITH_TESTS=$(call ptx/onoff, LIBIIO_TESTS)
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -61,6 +74,9 @@ $(STATEDIR)/libiio.targetinstall:
 
 	@$(call install_lib, libiio, 0, 0, 0644, libiio)
 
+	@$(foreach bin, $(LIBIIO_TESTS-y), \
+		$(call install_copy, libiio, 0, 0, 0755, -, /usr/bin/$(bin));)
+
 	@$(call install_finish, libiio)
 
 	@$(call touch)
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-01-14  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-14  9:50 [ptxdist] [PATCH 1/2] libiio: version bump 0.16 -> 0.17 Ladislav Michl
2019-01-14  9:50 ` Ladislav Michl [this message]
2019-01-16 15:32   ` [ptxdist] [PATCH 2/2] libiio: Add options for installing test binaries Michael Olbrich
2019-01-16 21:32     ` Ladislav Michl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190114095056.GB11361@lenoch \
    --to=ladis@linux-mips.org \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox