debuggers.hg

changeset 20946:7b751b0e6f1b

Revert changeset 20898:8c1889297084
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 04 19:40:19 2010 +0000 (2010-02-04)
parents 3c3759296796
children 503b47f53b53
files tools/check/check_libconfig_devel tools/libxl/Makefile
line diff
     1.1 --- a/tools/check/check_libconfig_devel	Thu Feb 04 13:16:39 2010 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,6 +0,0 @@
     1.4 -#!/bin/sh
     1.5 -# CHECK-BUILD
     1.6 -
     1.7 -. ./funcs.sh
     1.8 -
     1.9 -has_header libconfig.h || fail "missing libconfig headers (package libconfig-devel)"
     2.1 --- a/tools/libxl/Makefile	Thu Feb 04 13:16:39 2010 +0000
     2.2 +++ b/tools/libxl/Makefile	Thu Feb 04 19:40:19 2010 +0000
     2.3 @@ -14,6 +14,11 @@ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_
     2.4  
     2.5  LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
     2.6  
     2.7 +#LIBCONFIG_URL ?= http://www.hyperrealm.com/libconfig
     2.8 +LIBCONFIG_URL = $(XEN_EXTFILES_URL)
     2.9 +LIBCONFIG_SOURCE = libconfig-1.3.2
    2.10 +LIBCONFIG_OUTPUT = $(LIBCONFIG_SOURCE)/.libs
    2.11 +
    2.12  LIBXL_OBJS-y = osdeps.o
    2.13  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)
    2.14  
    2.15 @@ -34,11 +39,18 @@ libxenlight.so.$(MAJOR).$(MINOR): $(LIBX
    2.16  libxenlight.a: $(LIBXL_OBJS)
    2.17  	$(AR) rcs libxenlight.a $^
    2.18  
    2.19 -xl.o: xl.c
    2.20 -	$(CC) $(CFLAGS) -c xl.c
    2.21 +$(LIBCONFIG_SOURCE).tar.gz:
    2.22 +	$(WGET) $(LIBCONFIG_URL)/$@
    2.23  
    2.24 -$(CLIENTS): xl.o libxenlight.so
    2.25 -	$(CC) $(LDFLAGS) -o $@ $< $(LIBS) -L . -lxenlight -lconfig
    2.26 +$(LIBCONFIG_OUTPUT)/libconfig.so: $(LIBCONFIG_SOURCE).tar.gz
    2.27 +	[ ! -d "$(LIBCONFIG_SOURCE)" ] && tar xzf $<
    2.28 +	cd $(LIBCONFIG_SOURCE) && ./configure --prefix=$(PREFIX) --libdir=$(LIBDIR) --disable-cxx && $(MAKE)
    2.29 +
    2.30 +xl.o: $(LIBCONFIG_OUTPUT)/libconfig.so xl.c
    2.31 +	$(CC) $(CFLAGS) -I$(LIBCONFIG_SOURCE) -c xl.c
    2.32 +
    2.33 +$(CLIENTS): xl.o libxenlight.so $(LIBCONFIG_OUTPUT)/libconfig.so
    2.34 +	$(CC) $(LDFLAGS) -o $@ $< $(LIBS) -L . -lxenlight -L$(LIBCONFIG_OUTPUT) -lconfig
    2.35  
    2.36  .PHONY: install
    2.37  install: all
    2.38 @@ -48,11 +60,14 @@ install: all
    2.39  	ln -sf libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
    2.40  	$(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
    2.41  	$(INSTALL_DATA) libxl.h $(DESTDIR)$(INCLUDEDIR)
    2.42 +	cd $(LIBCONFIG_SOURCE) && DESTDIR=$(DESTDIR) $(MAKE) install
    2.43  
    2.44  .PHONY: clean
    2.45  clean:
    2.46  	$(RM) -f *.o *.so* *.a $(CLIENTS) $(DEPS)
    2.47 +	$(RM) -rf $(LIBCONFIG_SOURCE)
    2.48  
    2.49  distclean: clean
    2.50 +	$(RM) -f $(LIBCONFIG_SOURCE).tar.gz
    2.51  
    2.52  -include $(DEPS)