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

[Xen-devel] Re: ocaml build error

I wrote:
> On Debian lenny I run "make -j4 xen tools" and I get the message
> below.
> 
> I'm going to disable my ocaml build for now, but this needs to be
> fixed if for no other reason than that I'm working on a huge patch
> which makes a non-compatible interface change to libxc, and which will
> break the ocaml build completely if I can't include the adjustements
> to it in my patch submission.

In fact on a closer inspection this turns out to be a parallel make
error.  The author of the Makefile hadn't realised that if you mention
multiple things as a dependency, make may process them in any order.

The patch below fixes this.  However, the ocam build is still broken:

In file included from xc_lib.c:30:
xc.h:19:21: error: xen/xen.h: No such file or directory
xc.h:20:24: error: xen/memory.h: No such file or directory
xc.h:21:24: error: xen/sysctl.h: No such file or directory
xc.h:22:24: error: xen/domctl.h: No such file or directory
xc.h:23:23: error: xen/sched.h: No such file or directory
xc.h:26:31: error: xen/linux/privcmd.h: No such file or directory
xc.h:30:25: error: xen/version.h: No such file or directory
xc.h:31:32: error: xen/foreign/x86_32.h: No such file or directory
xc.h:32:32: error: xen/foreign/x86_64.h: No such file or directory
xc.h:33:28: error: xen/hvm/params.h: No such file or directory
In file included from xc.h:34,
                 from xc_lib.c:30:
xc_e820.h:4:26: error: xen/hvm/e820.h: No such file or directory

etc.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile
index 73c2988..ecd54b7 100644
--- a/tools/ocaml/Makefile
+++ b/tools/ocaml/Makefile
@@ -13,21 +13,23 @@ SUBDIRS = $(SUBDIRS_LIBS) $(SUBDIRS_PROGRAMS)
 .PHONY: all
 all: build
 
-.PHONY: build $(SUBDIRS)
-build: $(SUBDIRS)
+.PHONY: build SUBDIRS
+build: SUBDIRS
 
-$(SUBDIRS):
-       @echo " === building $@"
-       @$(MAKE) --no-print-directory -C $@
+SUBDIRS SUBDIRS_PROGRAMS SUBDIRS_LIBS:
+       @set -e; for d in $($@); do                     \
+               echo " === building $$d";               \
+               $(MAKE) --no-print-directory -C $$d;    \
+       done
 
 .PHONY: install install-libs install-program
 install: install-libs install-program
 
-install-program: $(SUBDIRS_PROGRAMS)
+install-program: SUBDIRS_PROGRAMS
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
        $(INSTALL_PROG) xenstored/oxenstored $(DESTDIR)$(SBINDIR)
 
-install-libs: $(SUBDIRS_LIBS)
+install-libs: SUBDIRS_LIBS
 
 .PHONY: clean
 clean:

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