All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] libcap: only install shared version
@ 2018-05-08 16:11 Fabrice Fontaine
  2018-05-09  7:47 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-05-08 16:11 UTC (permalink / raw)
  To: buildroot

If BR2_SHARED_LIBS is set, only install shared version of library
(continue to build both libraries through all target as there is no
libcap.so target but only a libcap.so.$(VERSION).$(MINOR))

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libcap/libcap.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk
index 48c2cb3456..247fd8a58f 100644
--- a/package/libcap/libcap.mk
+++ b/package/libcap/libcap.mk
@@ -20,8 +20,12 @@ LIBCAP_MAKE_TARGET = libcap.a libcap.pc
 LIBCAP_MAKE_INSTALL_TARGET = install-static
 else
 LIBCAP_MAKE_TARGET = all
+ifeq ($(BR2_SHARED_LIBS),y)
+LIBCAP_MAKE_INSTALL_TARGET = install-shared
+else
 LIBCAP_MAKE_INSTALL_TARGET = install
 endif
+endif
 
 LIBCAP_MAKE_FLAGS = \
 	BUILD_CC="$(HOSTCC)" \
-- 
2.14.1

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

* [Buildroot] [PATCH 1/1] libcap: only install shared version
  2018-05-08 16:11 [Buildroot] [PATCH 1/1] libcap: only install shared version Fabrice Fontaine
@ 2018-05-09  7:47 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-05-09  7:47 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  8 May 2018 18:11:36 +0200, Fabrice Fontaine wrote:

> diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk
> index 48c2cb3456..247fd8a58f 100644
> --- a/package/libcap/libcap.mk
> +++ b/package/libcap/libcap.mk
> @@ -20,8 +20,12 @@ LIBCAP_MAKE_TARGET = libcap.a libcap.pc
>  LIBCAP_MAKE_INSTALL_TARGET = install-static
>  else
>  LIBCAP_MAKE_TARGET = all
> +ifeq ($(BR2_SHARED_LIBS),y)
> +LIBCAP_MAKE_INSTALL_TARGET = install-shared
> +else
>  LIBCAP_MAKE_INSTALL_TARGET = install
>  endif
> +endif

I think we could use a clearer approach:

ifeq ($(BR2_STATIC_LIBS),y)
LIBCAP_MAKE_TARGET = libcap.a libcap.pc
LIBCAP_MAKE_INSTALL_TARGET = install-static
else if ($(BR2_SHARED_LIBS),y)
LIBCAP_MAKE_TARGET = all
LIBCAP_MAKE_INSTALL_TARGET = install-shared
else
LIBCAP_MAKE_TARGET = all
LIBCAP_MAKE_INSTALL_TARGET = install
endif

is a lot clearer to me.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2018-05-09  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 16:11 [Buildroot] [PATCH 1/1] libcap: only install shared version Fabrice Fontaine
2018-05-09  7:47 ` Thomas Petazzoni

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.