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

[Xen-changelog] [xen-unstable] libxenlight: Do not build libconfig, but require it as a prerequisite



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265289363 0
# Node ID 8c18892970840a17b91cede4f2e923181414d134
# Parent  217f6aa8771612979de48cd4934f9955d56ba7c0
libxenlight: Do not build libconfig, but require it as a prerequisite

Signed-off-by: Zhigang Wang <zhigang.x.wang@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/check/check_libconfig_devel |    6 ++++++
 tools/libxl/Makefile              |   23 ++++-------------------
 2 files changed, 10 insertions(+), 19 deletions(-)

diff -r 217f6aa87716 -r 8c1889297084 tools/check/check_libconfig_devel
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/check/check_libconfig_devel Thu Feb 04 13:16:03 2010 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+# CHECK-BUILD
+
+. ./funcs.sh
+
+has_header libconfig.h || fail "missing libconfig headers (package 
libconfig-devel)"
diff -r 217f6aa87716 -r 8c1889297084 tools/libxl/Makefile
--- a/tools/libxl/Makefile      Thu Feb 04 13:09:30 2010 +0000
+++ b/tools/libxl/Makefile      Thu Feb 04 13:16:03 2010 +0000
@@ -13,11 +13,6 @@ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_
 CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
 
 LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
-
-#LIBCONFIG_URL ?= http://www.hyperrealm.com/libconfig
-LIBCONFIG_URL = $(XEN_EXTFILES_URL)
-LIBCONFIG_SOURCE = libconfig-1.3.2
-LIBCONFIG_OUTPUT = $(LIBCONFIG_SOURCE)/.libs
 
 LIBXL_OBJS-y = osdeps.o
 LIBXL_OBJS = flexarray.o libxl.o libxl_dom.o libxl_exec.o libxl_xshelp.o 
libxl_device.o libxl_internal.o xenguest.o libxl_utils.o $(LIBXL_OBJS-y)
@@ -39,18 +34,11 @@ libxenlight.a: $(LIBXL_OBJS)
 libxenlight.a: $(LIBXL_OBJS)
        $(AR) rcs libxenlight.a $^
 
-$(LIBCONFIG_SOURCE).tar.gz:
-       $(WGET) $(LIBCONFIG_URL)/$@
+xl.o: xl.c
+       $(CC) $(CFLAGS) -c xl.c
 
-$(LIBCONFIG_OUTPUT)/libconfig.so: $(LIBCONFIG_SOURCE).tar.gz
-       [ ! -d "$(LIBCONFIG_SOURCE)" ] && tar xzf $<
-       cd $(LIBCONFIG_SOURCE) && ./configure --prefix=$(PREFIX) 
--libdir=$(LIBDIR) --disable-cxx && $(MAKE)
-
-xl.o: $(LIBCONFIG_OUTPUT)/libconfig.so xl.c
-       $(CC) $(CFLAGS) -I$(LIBCONFIG_SOURCE) -c xl.c
-
-$(CLIENTS): xl.o libxenlight.so $(LIBCONFIG_OUTPUT)/libconfig.so
-       $(CC) $(LDFLAGS) -o $@ $< $(LIBS) -L . -lxenlight -L$(LIBCONFIG_OUTPUT) 
-lconfig
+$(CLIENTS): xl.o libxenlight.so
+       $(CC) $(LDFLAGS) -o $@ $< $(LIBS) -L . -lxenlight -lconfig
 
 .PHONY: install
 install: all
@@ -60,14 +48,11 @@ install: all
        ln -sf libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
        $(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
        $(INSTALL_DATA) libxl.h $(DESTDIR)$(INCLUDEDIR)
-       cd $(LIBCONFIG_SOURCE) && DESTDIR=$(DESTDIR) $(MAKE) install
 
 .PHONY: clean
 clean:
        $(RM) -f *.o *.so* *.a $(CLIENTS) $(DEPS)
-       $(RM) -rf $(LIBCONFIG_SOURCE)
 
 distclean: clean
-       $(RM) -f $(LIBCONFIG_SOURCE).tar.gz
 
 -include $(DEPS)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.