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

[Xen-changelog] [xen master] build system: Introduce INSTALL_SHLIB and SYMLINK_SHLIB



commit 0343a41c86841d1296aab080a006bd74e4669e2f
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed Jun 25 10:54:38 2014 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jul 14 16:07:50 2014 +0100

    build system: Introduce INSTALL_SHLIB and SYMLINK_SHLIB
    
    INSTALL_SHLIB is like INSTALL_PROG but used only for shared libraries.
    SYMLINK_SHLIB is the ln -sf rune for shared library symlinks.
    
    Use these in the appropriate places in tools/libxc and tools/xenstore.
    
    No functional change right now.  In a forthcoming patch these
    variables might take on different values.
    
    Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/Rules.mk          |    3 +++
 tools/libxc/Makefile    |   20 ++++++++++----------
 tools/libxl/Makefile    |   20 ++++++++++----------
 tools/xenstore/Makefile |    2 +-
 4 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 0a8dd3e..cbdd741 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -21,6 +21,9 @@ CFLAGS_xeninclude = -I$(XEN_INCLUDE)
 
 XENSTORE_XENSTORED ?= y
 
+INSTALL_SHLIB = $(INSTALL_PROG)
+SYMLINK_SHLIB = ln -sf
+
 CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
 LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl.so
 SHLIB_libxenctrl  = -Wl,-rpath-link=$(XEN_LIBXC)
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index f77677c..4020f37 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -136,15 +136,15 @@ libs: $(LIB)
 install: build
        $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-       $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+       $(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
        $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
-       ln -sf libxenctrl.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
-       ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
+       $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
+       $(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) 
$(DESTDIR)$(LIBDIR)/libxenctrl.so
        $(INSTALL_DATA) xenctrl.h xenctrlosdep.h xentoollog.h 
$(DESTDIR)$(INCLUDEDIR)
-       $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+       $(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
        $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
-       ln -sf libxenguest.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
-       ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
+       $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
+       $(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) 
$(DESTDIR)$(LIBDIR)/libxenguest.so
        $(INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
 
 .PHONY: TAGS
@@ -174,9 +174,9 @@ libxenctrl.a: $(CTRL_LIB_OBJS)
        $(AR) rc $@ $^
 
 libxenctrl.so: libxenctrl.so.$(MAJOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 
 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
        $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) 
-Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) 
$(PTHREAD_LIBS) $(APPEND_LDFLAGS)
@@ -187,9 +187,9 @@ libxenguest.a: $(GUEST_LIB_OBJS)
        $(AR) rc $@ $^
 
 libxenguest.so: libxenguest.so.$(MAJOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 
 ifeq ($(CONFIG_MiniOS),y)
 zlib-options =
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index dd3dd8f..bd0db3b 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -193,10 +193,10 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h 
_libxl_type%.c: libxl_
        $(call move-if-changed,__libxl_type$*.c,_libxl_type$*.c)
 
 libxenlight.so: libxenlight.so.$(MAJOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 
 libxenlight.so.$(MAJOR): libxenlight.so.$(MAJOR).$(MINOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 
 libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS)
        $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) 
$(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
@@ -208,10 +208,10 @@ libxenlight.a: $(LIBXL_OBJS)
        $(AR) rcs libxenlight.a $^
 
 libxlutil.so: libxlutil.so.$(XLUMAJOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 
 libxlutil.so.$(XLUMAJOR): libxlutil.so.$(XLUMAJOR).$(XLUMINOR)
-       ln -sf $< $@
+       $(SYMLINK_SHLIB) $< $@
 
 libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(LIBXLU_OBJS)
        $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxlutil.so.$(XLUMAJOR) 
$(SHLIB_LDFLAGS) -o $@ $^ $(LIBXLU_LIBS) $(APPEND_LDFLAGS)
@@ -240,13 +240,13 @@ install: all
        $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
        $(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
        $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(PRIVATE_BINDIR)
-       $(INSTALL_PROG) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-       ln -sf libxenlight.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenlight.so.$(MAJOR)
-       ln -sf libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
+       $(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+       $(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenlight.so.$(MAJOR)
+       $(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) 
$(DESTDIR)$(LIBDIR)/libxenlight.so
        $(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
-       $(INSTALL_PROG) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)
-       ln -sf libxlutil.so.$(XLUMAJOR).$(XLUMINOR) 
$(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
-       ln -sf libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(LIBDIR)/libxlutil.so
+       $(INSTALL_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) 
$(DESTDIR)$(LIBDIR)
+       $(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) 
$(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
+       $(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) 
$(DESTDIR)$(LIBDIR)/libxlutil.so
        $(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
        $(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h 
_libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h 
$(DESTDIR)$(INCLUDEDIR)
        $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index a9473d6..0cf06f1 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -127,7 +127,7 @@ endif
                ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
        done
        $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-       $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
+       $(INSTALL_SHLIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
        ln -sf libxenstore.so.$(MAJOR).$(MINOR) 
$(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
        ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
        $(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.