From: Gianni Tedesco Subject: Re: [PATCH 7 of 8] libxl: generate destructors for each libxl defined type Date: Tue, 3 Aug 2010 13:07:21 +0100 Message-ID: <1280837241.18490.144.camel@qabil.uk.xensource.com> References: <6baa8ce2ec5ed5d140a6.1280833222@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6baa8ce2ec5ed5d140a6.1280833222@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Ian, Campbell , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org 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)