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] [PATCH] fix libxl build issues

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] fix libxl build issues
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Mon, 20 Sep 2010 14:33:24 +0100
Delivery-date: Mon, 20 Sep 2010 06:34:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Building in a tree with read-only source files failed because the flex/
bison generated files are left in place.

All of the source files (instead of all of the object files) were
depending on libxl.h (in particular forcing the needless re-generation
of the flex/bison generated files).

For _libxl_types.[ch] a single non-pattern rule was used. For non-
pattern rules with multiple targets, other than for pattern ones, the
body gets executed once for each target, causing problems when building
with -j<n>, <n> >= 2. Convert this rule to a pattern one.

The flex/bison generated headers pointlessly depended on the
corresponding source files. Use multiple-target pattern rules instead.

It would also have been nice if the minimal flex/bison versions needed
to successfully build libxl were documented: neither flex 2.5.31 nor
bison 2.1 (as found e.g. on SLE10) is sufficient.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2010-09-20.orig/tools/libxl/Makefile        2010-09-20 14:23:28.000000000 
+0200
+++ 2010-09-20/tools/libxl/Makefile     2010-09-20 14:24:20.000000000 +0200
@@ -42,18 +42,15 @@ XL_OBJS = xl.o xl_cmdimpl.o xl_cmdtable.
 all: $(CLIENTS) libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
        $(AUTOSRCS) $(AUTOINCS)
 
-$(AUTOINCS): $(AUTOSRCS)
-
-#%_y.h: %_y.c
-#%_l.h: %_l.c
-
 $(LIBXLU_OBJS): $(AUTOINCS)
 
-%.c: %.y
-       $(BISON) --output=$@ $<
-
-%.c: %.l
-       $(FLEX) --header-file=$*.h --outfile=$@ $<
+%.c %.h: %.y
+       @rm -f $*.[ch]
+       $(BISON) --output=$*.c $<
+
+%.c %.h: %.l
+       @rm -f $*.[ch]
+       $(FLEX) --header-file=$*.h --outfile=$*.c $<
 
 genpath-target = $(call buildmakevars2file,_libxl_paths.h)
 $(eval $(genpath-target))
@@ -66,12 +63,12 @@ libxl_paths.c: _libxl_paths.h
 
 libxl.h: _libxl_types.h
 
-$(LIBXL_OBJS:%.o=%.c) $(LIBXLU_OBJS:%.o=%.c) $(XL_OBJS:%.o=%.c): libxl.h
+$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS): libxl.h
 
-_libxl_types.h _libxl_types.c: libxl.idl gentypes.py libxltypes.py
-       $(PYTHON) gentypes.py libxl.idl __libxl_types.h __libxl_types.c
-       mv __libxl_types.h _libxl_types.h
-       mv __libxl_types.c _libxl_types.c
+_libxl_%.h _libxl_%.c: libxl.idl gen%.py libxl%.py
+       $(PYTHON) gen$*.py libxl.idl __libxl_$*.h __libxl_$*.c
+       mv __libxl_$*.h _libxl_$*.h
+       mv __libxl_$*.c _libxl_$*.c
 
 libxenlight.so: libxenlight.so.$(MAJOR)
        ln -sf $< $@



Attachment: libxlu-cfg-build.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>