From: Jan Tulak Date: Mon, 18 Aug 2014 01:11:06 +0000 (+1000) Subject: libhandle: fix installation for symlinked /usr X-Git-Tag: v3.2.2~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02ef543;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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)