]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libhandle: fix installation for symlinked /usr
authorJan Tulak <jan@tulak.me>
Mon, 18 Aug 2014 01:11:06 +0000 (11:11 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 18 Aug 2014 01:11:06 +0000 (11:11 +1000)
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 <jan@tulak.me>
Signed-off-by: Jan Tulak <jan@tulak.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
include/buildmacros

index 7a018805a24baec9d6f5cb69068e8ba7b4741b56..4e4e8fa1dc257956560844f06a9df63386d7dcf7 100644 (file)
@@ -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)