jimtcl: fix installation in BR2_STATIC_LIBS case
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 1 Apr 2015 21:14:38 +0000 (23:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 1 Apr 2015 21:14:38 +0000 (23:14 +0200)
commitef854d14f1eb8baed98014d216be3b97e6b44f06
tree9b0ffc3fc9e19d04cb5c3fc4f7ceb0171ae8eb35
parenta4c2843fbbd03c88457ae0ca37fb32fa9c80cb48
jimtcl: fix installation in BR2_STATIC_LIBS case

As noticed by Yann E. Morin in the review of
http://patchwork.ozlabs.org/patch/429533/, there was something fishy
in the jimtcl installation logic:

  ln -s libjim.$(JIMTCL_LIB) $(STAGING_DIR)/usr/lib/libjim.so

where JIMTCL_LIB has the value 'a' for BR2_STATIC_LIBS=y builds. Which
means we're linking libjim.so to libjim.a. Not great.

This commit therefore reworks the installation logic of the jimtcl.mk
package to install the shared library when BR2_STATIC_LIBS is not set,
and the static library when BR2_STATIC_LIBS is enabled. The macro
JIMTCL_INSTALL_LIB now takes as argument where the library should be
installed, so that it can be used for both the target and staging
installations.

Note that we can only either build the shared library *or* the static
library with the jimtcl build system. There is no possibility of
building both.

Reported-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/jimtcl/jimtcl.mk