From 02ef5434f3f0db4653f6c9e235cd52fa5a29de60 Mon Sep 17 00:00:00 2001 From: Jan Tulak Date: Mon, 18 Aug 2014 11:11:06 +1000 Subject: [PATCH] libhandle: fix installation for symlinked /usr Canonicalize the pathnames for PKG_LIB_DIR and PKG_ROOT_LIB_DIR before checking if they are the same. This is required for Fedora which doesn't have a separate /usr/lib directory anymore. [Christoph Hellwig: reformat and change to canonical names] Reported-by: Jan Tulak Signed-off-by: Jan Tulak Reviewed-by: Christoph Hellwig Signed-off-by: Dave Chinner --- include/buildmacros | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/buildmacros b/include/buildmacros index 7a018805a..4e4e8fa1d 100644 --- a/include/buildmacros +++ b/include/buildmacros @@ -76,10 +76,11 @@ INSTALL_LTLIB_DEV = \ ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_LIB_DIR)/$(LIBNAME).la ; \ ../$(INSTALL) -m 755 -d $(PKG_ROOT_LIB_DIR); \ ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_ROOT_LIB_DIR); \ - if test "x$(PKG_LIB_DIR)" != "x$(PKG_ROOT_LIB_DIR)" ; then \ - ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \ - ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \ - ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \ + if [ "x$(shell readlink -f $(PKG_LIB_DIR))" != \ + "x$(shell readlink -f $(PKG_ROOT_LIB_DIR))"; ]; then \ + ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_ROOT_LIB_DIR)/$(LIBNAME).a; \ + ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_ROOT_LIB_DIR)/$(LIBNAME).la; \ + ../$(INSTALL) -S $(PKG_ROOT_LIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so; \ fi else INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC) -- 2.39.5