diff mbox

[07/10] package/libxmlrpc: handle static/shared only install

Message ID 1419717508-11627-8-git-send-email-romain.naour@openwide.fr
State Rejected
Headers show

Commit Message

Romain Naour Dec. 27, 2014, 9:58 p.m. UTC
It's not possible to disable/enable static and shared libraries.

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
To be tested with static only build.
(probably brocken since shared libraries will be build)
---
 package/libxmlrpc/libxmlrpc.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Thomas Petazzoni Jan. 2, 2015, 12:18 p.m. UTC | #1
Dear Romain Naour,

On Sat, 27 Dec 2014 22:58:25 +0100, Romain Naour wrote:

> diff --git a/package/libxmlrpc/libxmlrpc.mk b/package/libxmlrpc/libxmlrpc.mk
> index c3788d6..5796ae6 100644
> --- a/package/libxmlrpc/libxmlrpc.mk
> +++ b/package/libxmlrpc/libxmlrpc.mk
> @@ -35,4 +35,15 @@ LIBXMLRPC_MAKE_ENV = \
>  	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
>  	LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)"
>  
> +
> +ifeq ($(BR2_SHARED_LIBS),y)
> +LIBXMLRPC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) \
> +	install-shared-libraries install-headers install-bin
> +endif
> +
> +ifeq ($(BR2_STATIC_LIBS),y)
> +LIBXMLRPC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) \
> +	install-static-libraries install-headers install-bin
> +endif

This does not work: in a BR2_SHARED_LIBS configuration, libraries are
no longer installed in the staging directory:

$ cat defconfig 
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2014.11.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17=y
BR2_TOOLCHAIN_EXTERNAL_LARGEFILE=y
BR2_TOOLCHAIN_EXTERNAL_INET_IPV6=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_LIBXMLRPC=y
# BR2_TARGET_ROOTFS_TAR is not set
$ make
[...]
$ LANG=C ls output/staging/usr/lib/libxmlrpc*
ls: cannot access output/staging/usr/lib/libxmlrpc*: No such file or directory

I'll mark the patch as Rejected in patchwork.

Thanks,

Thomas
Romain Naour Jan. 4, 2015, 2:23 p.m. UTC | #2
Hi Thomas,

Le 02/01/2015 13:18, Thomas Petazzoni a écrit :
> Dear Romain Naour,
> 
> On Sat, 27 Dec 2014 22:58:25 +0100, Romain Naour wrote:
> 
>> diff --git a/package/libxmlrpc/libxmlrpc.mk b/package/libxmlrpc/libxmlrpc.mk
>> index c3788d6..5796ae6 100644
>> --- a/package/libxmlrpc/libxmlrpc.mk
>> +++ b/package/libxmlrpc/libxmlrpc.mk
>> @@ -35,4 +35,15 @@ LIBXMLRPC_MAKE_ENV = \
>>  	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
>>  	LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)"
>>  
>> +
>> +ifeq ($(BR2_SHARED_LIBS),y)
>> +LIBXMLRPC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) \
>> +	install-shared-libraries install-headers install-bin
>> +endif
>> +
>> +ifeq ($(BR2_STATIC_LIBS),y)
>> +LIBXMLRPC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) \
>> +	install-static-libraries install-headers install-bin
>> +endif
> 
> This does not work: in a BR2_SHARED_LIBS configuration, libraries are
> no longer installed in the staging directory:

Yes, indeed... sorry :-/

Let's use install target and trash this patch.

> 
> $ cat defconfig 
> BR2_arm=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
> BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2014.11.tar.bz2"
> BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17=y
> BR2_TOOLCHAIN_EXTERNAL_LARGEFILE=y
> BR2_TOOLCHAIN_EXTERNAL_INET_IPV6=y
> BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
> # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
> BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
> BR2_TOOLCHAIN_EXTERNAL_CXX=y
> BR2_INIT_NONE=y
> BR2_SYSTEM_BIN_SH_NONE=y
> # BR2_PACKAGE_BUSYBOX is not set
> BR2_PACKAGE_LIBXMLRPC=y
> # BR2_TARGET_ROOTFS_TAR is not set
> $ make
> [...]
> $ LANG=C ls output/staging/usr/lib/libxmlrpc*
> ls: cannot access output/staging/usr/lib/libxmlrpc*: No such file or directory
> 
> I'll mark the patch as Rejected in patchwork.
> 

Thanks for testing.
(hopefully this patch hasn't been commited)

Best regards,
Romain
diff mbox

Patch

diff --git a/package/libxmlrpc/libxmlrpc.mk b/package/libxmlrpc/libxmlrpc.mk
index c3788d6..5796ae6 100644
--- a/package/libxmlrpc/libxmlrpc.mk
+++ b/package/libxmlrpc/libxmlrpc.mk
@@ -35,4 +35,15 @@  LIBXMLRPC_MAKE_ENV = \
 	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
 	LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)"
 
+
+ifeq ($(BR2_SHARED_LIBS),y)
+LIBXMLRPC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) \
+	install-shared-libraries install-headers install-bin
+endif
+
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBXMLRPC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) \
+	install-static-libraries install-headers install-bin
+endif
+
 $(eval $(autotools-package))