[clutter/multi-backend] build: Improve the compat libs rule



commit 5c9d56c7b4345dec879d40739ddfc479fa687cee
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Oct 3 17:11:49 2011 +0100

    build: Improve the compat libs rule
    
    Use the same commands libtool uses when installing symbolic links for
    the shared libraries.

 clutter/Makefile.am |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/clutter/Makefile.am b/clutter/Makefile.am
index 7651456..4a1782d 100644
--- a/clutter/Makefile.am
+++ b/clutter/Makefile.am
@@ -407,7 +407,9 @@ clutter-glx-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc
 
 pc_files += clutter-glx-$(CLUTTER_API_VERSION).pc
 
-compat_libs += libclutter-glx-$(CLUTTER_API_VERSION).so.0
+compat_libs += \
+	libclutter-glx-$(CLUTTER_API_VERSION).so \
+	$(NULL)
 endif
 
 # GDK backend rules
@@ -545,7 +547,9 @@ clutter-cex100-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc
 
 pc_files += clutter-cex100-$(CLUTTER_API_VERSION).pc
 
-compat_libs += libclutter-cex100-$(CLUTTER_API_VERSION).so.0
+compat_libs += \
+	libclutter-cex100-$(CLUTTER_API_VERSION).so \
+	$(NULL)
 endif # SUPPORT_CEX100
 
 if SUPPORT_EGL
@@ -627,7 +631,9 @@ clutter-wayland-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc
 
 pc_files += clutter-wayland-$(CLUTTER_API_VERSION).pc
 
-compat_libs += libclutter-wayland-$(CLUTTER_API_VERSION).so.0
+compat_libs += \
+	libclutter-wayland-$(CLUTTER_API_VERSION).so \
+	$(NULL)
 endif # SUPPORT_WAYLAND
 
 # cally
@@ -733,9 +739,17 @@ libclutter_ CLUTTER_API_VERSION@_la_LDFLAGS = \
 	$(NULL)
 
 install-exec-local:
-	for lib in "$(compat_libs)"; do \
-		rm -f $(DESTDIR)$(libdir)/$$lib ; \
-		ln -s libclutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $(DESTDIR)$(libdir)/$$lib ; \
+	for lib in `echo $(compat_libs)`; do \
+	  (cd $(DESTDIR)$(libdir) && \
+	    { ln -s -f libclutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0 || \
+	      { rm -f $$lib.0 && ln -s libclutter-1.0.so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib.0; }; \
+	    } \
+	  ) ; \
+	  (cd $(DESTDIR)$(libdir) && \
+	    { ln -s -f libclutter-$(CLUTTER_API_VERSION).so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib || \
+	      { rm -f $$lib && ln -s libclutter-1.0.so.0.$(CLUTTER_LT_CURRENT).$(CLUTTER_LT_REVISION) $$lib; }; \
+	    } \
+	  ) ; \
 	done
 
 # gobject-introspection rules



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]