]> git.sur5r.net Git - openldap/commitdiff
ITS#5929 create and remove shared library symlinks
authorHoward Chu <hyc@openldap.org>
Mon, 9 Feb 2009 07:35:37 +0000 (07:35 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 9 Feb 2009 07:35:37 +0000 (07:35 +0000)
build/lib-shared.mk
build/lib.mk

index e2fe632d3eb6748c5a08e5b281734a2fbc1e1107..b16f4f61ed8bb75a0c3727c70ef28667e6c43b7d 100644 (file)
@@ -25,6 +25,14 @@ MKDEPFLAG = -l
 
 $(LIBRARY): version.lo
        $(LTLINK_LIB) -o $@ $(OBJS) version.lo $(LINK_LIBS)
+       @if test "$(BUILD_LIBS_DYNAMIC)" = shared; then \
+               DIR=`$(PWD)`; DIR=`$(BASENAME) $$DIR`; \
+               dlname=`grep '^dlname=' $@`; \
+               eval $$dlname; \
+               echo "$(RM) ../$$dlname; ln -s $$DIR/.libs/$$dlname .."; \
+               $(RM) ../$$dlname; $(LN_S) $$DIR/.libs/$$dlname .; \
+               mv $$dlname ..; \
+       fi
 
 Makefile: $(top_srcdir)/build/lib-shared.mk
 
index 720840921f3d435371a09c0fce6231888f096175..dc4bef5ccbed9d7d063c272230c7943604ccbb5f 100644 (file)
@@ -41,7 +41,7 @@ clean-common:         FORCE
        $(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
                $(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
                *.o *.lo a.out *.exe core version.c .libs/* \
-               ../`$(BASENAME) $(LIBRARY) .la`.so* \
+               ../`$(BASENAME) $(LIBRARY) .la`*.so* \
                ../`$(BASENAME) $(LIBRARY) .la`*.dll
 
 depend-common: FORCE