From: Mark McLoughlin Subject: [PATCH] Make libxenstore a versioned library Date: Thu, 20 Jul 2006 09:50:21 +0100 Message-ID: <1153385422.2758.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-RGDr5RKzee6xhO6YJKDL" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=-RGDr5RKzee6xhO6YJKDL Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, Unlike libxenguest and libxenctl, libxenstore is unversioned. Attaching a patch which rectifies that. Cheers, Mark. --=-RGDr5RKzee6xhO6YJKDL Content-Disposition: attachment; filename=xen-versioned-lib.patch Content-Type: text/x-patch; name=xen-versioned-lib.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit --- xen-unstable.hg/tools/xenstore/Makefile.versioned-lib 2006-07-13 15:39:15.000000000 +0100 +++ xen-unstable.hg/tools/xenstore/Makefile 2006-07-20 10:37:57.000000000 +0100 @@ -2,6 +2,9 @@ include $(XEN_ROOT)/tools/Rules.mk XEN_LIBXC = $(XEN_ROOT)/tools/libxc +MAJOR = 3.0 +MINOR = 0 + INSTALL = install INSTALL_DATA = $(INSTALL) -m0644 INSTALL_PROG = $(INSTALL) -m0755 @@ -35,7 +38,7 @@ XENSTORED_OBJS += $(XENSTORED_$(OS)) .PHONY: all -all: libxenstore.so xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls +all: libxenstore.so libxenstore.a xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls test_interleaved_transactions: test_interleaved_transactions.o $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@ @@ -87,12 +90,20 @@ talloc_test.o: talloc.c $(COMPILE.c) -o $@ $< -libxenstore.so: xs.opic xs_lib.opic - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ -lpthread +libxenstore.a: xs.o xs_lib.o + $(AR) rc $@ $^ + +libxenstore.so: libxenstore.so.$(MAJOR) + ln -sf $< $@ +libxenstore.so.$(MAJOR): libxenstore.so.$(MAJOR).$(MINOR) + ln -sf $< $@ + +libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so.$(MAJOR) -shared -o $@ $^ -lpthread .PHONY: clean clean: testsuite-clean - rm -f *.o *.opic *.so + rm -f *.o *.opic *.so* rm -f xenstored xs_random xs_stress xs_crashme rm -f xs_test xenstored_test xs_tdb_dump xenstore-control xenstore-ls rm -f $(CLIENTS) @@ -172,7 +183,10 @@ $(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin $(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR) - $(INSTALL_LIBS) libxenstore.so $(DESTDIR)/usr/$(LIBDIR) + $(INSTALL_LIBS) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR) + $(INSTALL_LIBS) libxenstore.a $(DESTDIR)/usr/$(LIBDIR) + ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR) + ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include --=-RGDr5RKzee6xhO6YJKDL Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-RGDr5RKzee6xhO6YJKDL--