WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 7 of 8] libxl: generate destructors for each libx

To: Ian Campbell <ian.campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 7 of 8] libxl: generate destructors for each libxl defined type
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Tue, 3 Aug 2010 13:07:21 +0100
Cc: Ian, Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 03 Aug 2010 05:11:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6baa8ce2ec5ed5d140a6.1280833222@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <6baa8ce2ec5ed5d140a6.1280833222@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2010-08-03 at 12:00 +0100, Ian Campbell wrote:
>  LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o
>  LIBXL_OBJS = flexarray.o libxl.o libxl_pci.o libxl_dom.o libxl_exec.o 
> libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o 
> $(LIBXL_OBJS-y)
> +LIBXL_OBJS += _libxl_types.c

uhm... _libxl_types.o ??

>  AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h
>  AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
> @@ -54,9 +55,10 @@ libxl_paths.c: _libxl_paths.h
> 
>  libxl.h: _libxl_types.h
> 
> -_libxl_types.h: gentypes.py libxltypes.py
> -       python gentypes.py __libxl_types.h
> +_libxl_types.h _libxl_types.c: gentypes.py libxltypes.py
> +       python gentypes.py __libxl_types.h __libxl_types.c
>         mv __libxl_types.h _libxl_types.h
> +       mv __libxl_types.c _libxl_types.c

Something is still wrong in the dep tree that breaks a clean build. I
think part of the problem is that the build system cannot find what
depends on _libxl_types.h until the compile-time-generate dep files are
created. On the other hand, it can't create the dep files if the
_libxl_types.h is not there.

Solution is to manually tweak the dep tree, meh:

diff -r 87613ac31ddc tools/libxl/Makefile
--- a/tools/libxl/Makefile      Tue Aug 03 12:50:05 2010 +0100
+++ b/tools/libxl/Makefile      Tue Aug 03 13:09:35 2010 +0100
@@ -19,7 +19,7 @@ LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_l
 
 LIBXL_OBJS-y = osdeps.o libxl_paths.o libxl_bootloader.o
 LIBXL_OBJS = flexarray.o libxl.o libxl_pci.o libxl_dom.o libxl_exec.o 
libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o 
$(LIBXL_OBJS-y)
-LIBXL_OBJS += _libxl_types.c
+LIBXL_OBJS += _libxl_types.o
 
 AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h
 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
@@ -84,18 +84,20 @@ libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(
 libxlutil.a: $(LIBXLU_OBJS)
        $(AR) rcs libxlutil.a $^
 
-xl.o: xl.c
+xl.o: xl.c _libxl_types.h
        $(CC) $(CFLAGS) -c xl.c
 
-xl_cmdimpl.o: xl_cmdimpl.c
+xl_cmdimpl.o: xl_cmdimpl.c _libxl_types.h
        $(CC) $(CFLAGS) -c xl_cmdimpl.c
 
-xl_cmdtable.o: xl_cmdtable.c
+xl_cmdtable.o: xl_cmdtable.c _libxl_types.h
        $(CC) $(CFLAGS) -c xl_cmdtable.c
 
 $(CLIENTS): xl.o xl_cmdimpl.o xl_cmdtable.o libxlutil.so libxenlight.so
        $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
 
+%.so: _libxl_types.h
+
 .PHONY: install
 install: all
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>