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-api

[Xen-API] [PATCH 2 of 4] add configure-time option to use system install

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 2 of 4] add configure-time option to use system installed Xen library bindings
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 11 Jan 2011 10:56:04 +0000
Cc: gianni.tedesco@xxxxxxxxxx, zheng.li@xxxxxxxxxxxxx
Delivery-date: Tue, 11 Jan 2011 03:48:51 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1294743362@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1294743362@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.5.2
# HG changeset patch
# User root@xxxxxxxxxxxxxxxxxxxxx
# Date 1294651010 18000
# Node ID 1c6d162d4b350bcc0a1a0430605fe8d9a1673f6d
# Parent  c6eaf00013e159edd2e4e54cc5375a3e1a9ac623
add configure-time option to use system installed Xen library bindings.

Could be made to auto detect the Xen version but for now requires the user to
explicitly opt in.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r c6eaf00013e1 -r 1c6d162d4b35 Makefile.in
--- a/Makefile.in       Mon Jan 10 04:16:04 2011 -0500
+++ b/Makefile.in       Mon Jan 10 04:16:50 2011 -0500
@@ -5,9 +5,13 @@ HAVE_LINUX_CDROM = @LINUX_CDROM@
 HAVE_XMLM = @OCAML_PKG_xmlm@
 HAVE_TYPECONV = @OCAML_PKG_type_conv@
 
+include config.mk
+
 .PHONY: all
 all:
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C uuid
+endif
 ifeq ($(HAVE_TYPECONV),type-conv)
        $(MAKE) -C rpc-light
 endif
@@ -36,20 +40,28 @@ endif
 .PHONY: allxen
 allxen:
 ifeq ($(HAVE_XEN),1)
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C mmap
+endif
        $(MAKE) -C netdev
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C xc
        $(MAKE) -C xb
        $(MAKE) -C xs
+endif
        $(MAKE) -C xsrpc
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C eventchn
+endif
        $(MAKE) -C cpuid
        $(MAKE) -C vhd
        $(MAKE) -C tapctl
 endif
 
 install:
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C uuid install
+endif
        $(MAKE) -C stdext install
        $(MAKE) -C log install
        $(MAKE) -C stunnel install
@@ -76,20 +88,28 @@ endif
 
 installxen:
 ifeq ($(HAVE_XEN),1)
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C mmap install
+endif
        $(MAKE) -C netdev install
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C xc install
        $(MAKE) -C xb install
        $(MAKE) -C xs install
+endif
        $(MAKE) -C xsrpc install
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C eventchn install
+endif
        $(MAKE) -C cpuid install
        $(MAKE) -C vhd install
        $(MAKE) -C tapctl install
 endif
 
 uninstall:
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C uuid uninstall
+endif
        $(MAKE) -C stdext uninstall
        $(MAKE) -C log uninstall
        $(MAKE) -C stunnel uninstall
@@ -116,13 +136,19 @@ endif
 
 uninstallxen:
 ifeq ($(HAVE_XEN),1)
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C eventchn uninstall
+endif
        $(MAKE) -C xsrpc uninstall
        $(MAKE) -C netdev uninstall
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C xs uninstall
        $(MAKE) -C xb uninstall
        $(MAKE) -C xc uninstall
+endif
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C mmap uninstall
+endif
        $(MAKE) -C cpuid uninstall
        $(MAKE) -C vhd uninstall
        $(MAKE) -C tapctl uninstall
@@ -153,24 +179,32 @@ binuninstall:
 
 .PHONY: doc
 doc:
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C uuid doc
+endif
        $(MAKE) -C stdext doc
        $(MAKE) -C sexpr doc
        $(MAKE) -C log doc
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C xb doc
        $(MAKE) -C xc doc
        $(MAKE) -C xs doc
+endif
        $(MAKE) -C xml-light2 doc
        $(MAKE) -C rpc-light doc
        $(MAKE) -C http-svr doc
        $(MAKE) -C camldm doc
        $(MAKE) -C cdrom doc
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C eventchn doc
+endif
        $(MAKE) -C pciutil doc
        $(MAKE) -C rss doc
        $(MAKE) -C stunnel doc
        $(MAKE) -C xsrpc doc
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C mmap doc
+endif
        $(MAKE) -C netdev doc
        $(MAKE) -C forking_executioner doc
        $(MAKE) -C mlvm doc
@@ -181,7 +215,9 @@ doc:
 
 .PHONY: clean
 clean:
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C uuid clean
+endif
        $(MAKE) -C camldm clean
        $(MAKE) -C stdext clean
        $(MAKE) -C log clean
@@ -203,13 +239,19 @@ clean:
        $(MAKE) -C xen-utils clean
 
 cleanxen:
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C mmap clean
+endif
        $(MAKE) -C netdev clean
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C xc clean
        $(MAKE) -C xb clean
        $(MAKE) -C xs clean
+endif
        $(MAKE) -C xsrpc clean
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C eventchn clean
+endif
 
 RPM_SPECSDIR=$(shell rpm --eval='%_specdir')
 RPM_SOURCEDIR=$(shell rpm --eval='%_sourcedir')
diff -r c6eaf00013e1 -r 1c6d162d4b35 camldm/Makefile
--- a/camldm/Makefile   Mon Jan 10 04:16:04 2011 -0500
+++ b/camldm/Makefile   Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 cdrom/Makefile
--- a/cdrom/Makefile    Mon Jan 10 04:16:04 2011 -0500
+++ b/cdrom/Makefile    Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 close-and-exec/Makefile
--- a/close-and-exec/Makefile   Mon Jan 10 04:16:04 2011 -0500
+++ b/close-and-exec/Makefile   Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
@@ -29,7 +31,7 @@ bins: $(PROGRAMS)
 libs: $(LIBS)
 
 closeandexec: closeandexec.cmxa closeandexec_main.cmx all
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -thread -I ../stdext -I ../uuid uuid.cmxa 
unix.cmxa threads.cmxa stdext.cmxa closeandexec.cmxa closeandexec_main.cmx -o 
$@ 
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -thread -I ../stdext $(OCAML_UUID_INC) 
uuid.cmxa unix.cmxa threads.cmxa stdext.cmxa closeandexec.cmxa 
closeandexec_main.cmx -o $@ 
 
 closeandexec.cmxa: $(foreach obj,$(OBJS),$(obj).cmx)
        $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmx)
diff -r c6eaf00013e1 -r 1c6d162d4b35 configure.ac
--- a/configure.ac      Mon Jan 10 04:16:04 2011 -0500
+++ b/configure.ac      Mon Jan 10 04:16:50 2011 -0500
@@ -30,6 +30,11 @@ AC_CHECK_HEADERS([xen/xen.h],[XEN=1],[XE
 AC_CHECK_HEADERS([libdevmapper.h], [DEVICE_MAPPER=1], [DEVICE_MAPPER=0])
 AC_CHECK_HEADERS([linux/cdrom.h], [LINUX_CDROM=1], [LINUX_CDROM=0])
 
+HAVE_XEN_SYSTEM_BINDINGS=0 # could do more intelligent detection here... 
+AC_ARG_WITH(xen-system-bindings, 
AS_HELP_STRING([--without-xen-system-bindings],[do not use the system installed 
xen bindings]),
+       [if test "x$withval" = "xno"; then WITH_XEN_SYSTEM_BINDINGS=0; else 
WITH_XEN_SYSTEM_BINDINGS=1; fi],
+       [WITH_XEN_SYSTEM_BINDINGS=$HAVE_XEN_SYSTEM_BINDINGS])
+
 # Checks for typedefs, structures, and compiler characteristics.
 AC_CHECK_DECLS([XS_RESTRICT],[],[],[
 [
@@ -54,8 +59,9 @@ fi
 AC_CHECK_OCAML_PKG([xmlm])
 AC_CHECK_OCAML_PKG([type-conv])
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile config.mk])
 AC_SUBST([XEN])
+AC_SUBST([WITH_XEN_SYSTEM_BINDINGS])
 AC_SUBST([DEVICE_MAPPER])
 AC_SUBST([LINUX_CDROM])
 AC_SUBST([OCAML_PKG_xmlm])
diff -r c6eaf00013e1 -r 1c6d162d4b35 cpuid/Makefile
--- a/cpuid/Makefile    Mon Jan 10 04:16:04 2011 -0500
+++ b/cpuid/Makefile    Mon Jan 10 04:16:50 2011 -0500
@@ -1,8 +1,10 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml -I$(XEN_ROOT)/usr/include
 OCAMLC = ocamlc -g
 OCAMLOPT = ocamlopt
-INCLUDES = -I ../stdext -I ../xc -I ../xen-utils
+INCLUDES = -I ../stdext $(OCAML_XC_INC) -I ../xen-utils
 
 LDFLAGS = -cclib -L./
 
diff -r c6eaf00013e1 -r 1c6d162d4b35 doc/Makefile
--- a/doc/Makefile      Mon Jan 10 04:16:04 2011 -0500
+++ b/doc/Makefile      Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 .PHONY: clean
 clean:
        rm -rf components.js content
diff -r c6eaf00013e1 -r 1c6d162d4b35 eventchn/Makefile
--- a/eventchn/Makefile Mon Jan 10 04:16:04 2011 -0500
+++ b/eventchn/Makefile Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml -I$(XEN_ROOT)/usr/include
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 forking_executioner/Makefile
--- a/forking_executioner/Makefile      Mon Jan 10 04:16:04 2011 -0500
+++ b/forking_executioner/Makefile      Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
@@ -31,19 +33,19 @@ bins: $(PROGRAMS)
 libs: $(LIBS)
 
 test_forker: test_forker.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../rpc-light -I ../uuid -I ../stdext 
uuid.cmxa rpc.cmx jsonrpc.cmx -I ../log unix.cmxa stdext.cmxa  test_forker.cmx 
-o $@
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../rpc-light $(OCAML_UUID_INC) -I 
../stdext uuid.cmxa rpc.cmx jsonrpc.cmx -I ../log unix.cmxa stdext.cmxa  
test_forker.cmx -o $@
 
 fe: fe_debug.cmx child.cmx fe_main.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../rpc-light -I ../stdext -I ../uuid -I 
../log log.cmxa uuid.cmxa unix.cmxa rpc.cmx jsonrpc.cmx stdext.cmxa 
fe_debug.cmx child.cmx fe_main.cmx -o $@ 
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../rpc-light -I ../stdext 
$(OCAML_UUID_INC) -I ../log log.cmxa uuid.cmxa unix.cmxa rpc.cmx jsonrpc.cmx 
stdext.cmxa fe_debug.cmx child.cmx fe_main.cmx -o $@ 
 
 %.cmo: %.ml
-       $(OCAMLC) -c -I ../log -I ../uuid -I ../stdext -thread -o $@  $<
+       $(OCAMLC) -c -I ../log $(OCAML_UUID_INC) -I ../stdext -thread -o $@  $<
 
 %.cmi: %.mli
-       $(OCAMLC) -c -I ../log -I ../uuid -I ../stdext -o $@  $<
+       $(OCAMLC) -c -I ../log $(OCAML_UUID_INC) -I ../stdext -o $@  $<
 
 %.cmx: %.ml
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../log -I ../uuid -c -I ../stdext -o $@ 
$<
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../log $(OCAML_UUID_INC) -c -I 
../stdext -o $@ $<
 
 META: META.in
        sed 's/@VERSION@/$(VERSION)/g' < $< > $@
diff -r c6eaf00013e1 -r 1c6d162d4b35 http-svr/Makefile
--- a/http-svr/Makefile Mon Jan 10 04:16:04 2011 -0500
+++ b/http-svr/Makefile Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 log/Makefile
--- a/log/Makefile      Mon Jan 10 04:16:04 2011 -0500
+++ b/log/Makefile      Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 OCAMLLOC := $(shell ocamlc -where)
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -I$(OCAMLLOC)
diff -r c6eaf00013e1 -r 1c6d162d4b35 mk/Makefile
--- a/mk/Makefile       Mon Jan 10 04:16:04 2011 -0500
+++ b/mk/Makefile       Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 ifdef B_BASE
 include $(B_BASE)/common.mk
 include $(B_BASE)/rpmbuild.mk
diff -r c6eaf00013e1 -r 1c6d162d4b35 mlvm/Makefile
--- a/mlvm/Makefile     Mon Jan 10 04:16:04 2011 -0500
+++ b/mlvm/Makefile     Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,4 @@
+include ../config.mk
 
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
@@ -18,7 +19,7 @@ INTF = $(foreach obj, $(LIBOBJS),$(obj).
 CMDOBJS = messages.cmx mlvm.cmx
 OCAMLC = ocamlfind ocamlc -g
 OCAMLOPT = ocamlfind ocamlopt 
-COMPFLAG = -dtypes -g -I ../stdext -I ../camldm -I ../uuid -for-pack Lvm -pp 
'${PP}' -I ../rpc-light
+COMPFLAG = -dtypes -g -I ../stdext -I ../camldm $(OCAML_UUID_INC) -for-pack 
Lvm -pp '${PP}' -I ../rpc-light
 
 LIBS = lvm.cma lvm.cmxa
 
@@ -27,7 +28,7 @@ DOCDIR = /myrepos/xen-api-libs.hg/doc
 default : $(LIBS)
 
 test_allocator: default
-       $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g  -I ../stdext -I 
../camldm -I ../uuid -I +kaputt unix.cmxa ../rpc-light/rpc.cmx 
../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa ../uuid/uuid.cmxa 
../stdext/stdext.cmxa ./lvm.cmxa test_allocator.ml -o $@
+       $(OCAMLOPT) -package kaputt -linkpkg -dtypes -g  -I ../stdext -I 
../camldm $(OCAML_UUID_INC) -I +kaputt unix.cmxa ../rpc-light/rpc.cmx 
../rpc-light/jsonrpc.cmx ../camldm/camldm.cmxa $(OCAML_UUID_DIR)/uuid.cmxa 
../stdext/stdext.cmxa ./lvm.cmxa test_allocator.ml -o $@
 
 lvm.cmx: $(foreach obj,$(LIBOBJS),$(obj).cmx)
        $(OCAMLOPT) -pack -g -o $@ $(foreach obj,$(LIBOBJS),$(obj).cmx)
diff -r c6eaf00013e1 -r 1c6d162d4b35 mmap/Makefile
--- a/mmap/Makefile     Mon Jan 10 04:16:04 2011 -0500
+++ b/mmap/Makefile     Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 netdev/Makefile
--- a/netdev/Makefile   Mon Jan 10 04:16:04 2011 -0500
+++ b/netdev/Makefile   Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 pciutil/Makefile
--- a/pciutil/Makefile  Mon Jan 10 04:16:04 2011 -0500
+++ b/pciutil/Makefile  Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
@@ -29,7 +31,7 @@ bins: $(PROGRAMS)
 libs: $(LIBS)
 
 pciutil: pciutil_main.cmx
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ./ -I ../stdext -I ../uuid unix.cmxa 
uuid.cmxa stdext.cmxa pciutil.cmx -o $@ $^
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ./ -I ../stdext $(OCAML_UUID_INC) 
unix.cmxa uuid.cmxa stdext.cmxa pciutil.cmx -o $@ $^
 
 pciutil.cmxa: $(foreach obj,$(OBJS),$(obj).cmx)
        $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmx)
diff -r c6eaf00013e1 -r 1c6d162d4b35 rpc-light/Makefile
--- a/rpc-light/Makefile        Mon Jan 10 04:16:04 2011 -0500
+++ b/rpc-light/Makefile        Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 OCAMLC = ocamlfind ocamlc
 OCAMLOPT = ocamlfind ocamlopt
 OCAMLFLAGS = -annot -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 rss/Makefile
--- a/rss/Makefile      Mon Jan 10 04:16:04 2011 -0500
+++ b/rss/Makefile      Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 sexpr/Makefile
--- a/sexpr/Makefile    Mon Jan 10 04:16:04 2011 -0500
+++ b/sexpr/Makefile    Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
diff -r c6eaf00013e1 -r 1c6d162d4b35 stdext/Makefile
--- a/stdext/Makefile   Mon Jan 10 04:16:04 2011 -0500
+++ b/stdext/Makefile   Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755
 CC = gcc
 OCAMLLOC := $(shell ocamlc -where)
@@ -17,6 +19,9 @@ OCAMLDESTDIR ?= $(OCAMLLIBDIR)
 
 FEPP = camlp4o -I ../rpc-light -I $(shell ocamlfind query type-conv) 
pa_type_conv.cmo pa_rpc.cma
 
+OCAML_UUID_INC = -I $(OCAML_UUID_DIR)
+OCAML_UUID_LIB = $(OCAML_UUID_DIR)/uuid.cmxa
+
 OCAML_TEST_INC = -I $(shell ocamlfind query oUnit)
 OCAML_TEST_LIB = $(shell ocamlfind query oUnit)/oUnit.cmxa
 
@@ -75,10 +80,10 @@ base64pp: base64_main.ml all libstdext_s
        ocamlfind $(OCAMLOPT) $(OCAMLOPTFLAGS) stdext.cmxa -linkpkg -o $@ $< 
-ccopt -L.
 
 fe_cli: fe_cli.ml all libstdext_stubs.a
-       ocamlfind $(OCAMLOPT) $(OCAMLOPTFLAGS) unix.cmxa ../uuid/uuid.cmxa 
../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx stdext.cmxa -linkpkg -o $@ $< 
-ccopt -L.
+       ocamlfind $(OCAMLOPT) $(OCAMLOPTFLAGS) unix.cmxa $(OCAML_UUID_LIB) 
../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx stdext.cmxa -linkpkg -o $@ $< 
-ccopt -L.
 
 fe_test: fe_test.ml all libstdext_stubs.a
-       ocamlfind $(OCAMLOPT) $(OCAMLOPTFLAGS) unix.cmxa ../uuid/uuid.cmxa 
../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx stdext.cmxa -linkpkg -I ../uuid 
-o $@ $< -ccopt -L.
+       ocamlfind $(OCAMLOPT) $(OCAMLOPTFLAGS) unix.cmxa $(OCAML_UUID_LIB) 
../rpc-light/rpc.cmx ../rpc-light/jsonrpc.cmx stdext.cmxa -linkpkg 
$(OCAML_UUID_INC) -o $@ $< -ccopt -L.
 
 extentlistset_test: extentlistset_test.ml all libstdext_stubs.a
        ocamlfind $(OCAMLOPT) $(OCAMLOPTFLAGS) unix.cmxa stdext.cmxa -linkpkg 
-o $@ $< -ccopt -L.
@@ -111,10 +116,10 @@ fe.cmo: fe.ml
        $(OCAMLC) -pp '$(FEPP)' -I ../jsonrpc -I ../rpc-light -c -o $@ $<
 
 forkhelpers.cmo: forkhelpers.ml forkhelpers.cmi
-       $(OCAMLC) -thread -I ../uuid -c -o $@ $<
+       $(OCAMLC) -thread $(OCAML_UUID_INC) -c -o $@ $<
 
 filenameext.cmo: filenameext.ml filenameext.cmi
-       $(OCAMLC) -c -I ../uuid -o $@ $<
+       $(OCAMLC) -c $(OCAML_UUID_INC) -o $@ $<
 
 %.cmo: %.ml %.cmi
        $(OCAMLC) -c -o $@ $<
@@ -126,7 +131,7 @@ forkhelpers.cmi: forkhelpers.mli
        $(OCAMLC) -thread -c -o $@ $<
 
 filenameext.cmi: filenameext.mli
-       $(OCAMLC) -c -I ../uuid -o $@ $<
+       $(OCAMLC) -c $(OCAML_UUID_INC) -o $@ $<
 
 fe.cmi: fe.cmo
        $(OCAMLC) -pp '$(FEPP)' -c -o $@ $<
@@ -144,13 +149,13 @@ fecomms.cmx : fecomms.ml
        $(OCAMLOPT) -I ../rpc-light -c -o $@ $<
 
 forkhelpers.cmx: forkhelpers.ml forkhelpers.cmi
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../uuid -thread -c -o $@ $<
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAML_UUID_INC) -thread -c -o $@ $<
 
 filenameext.cmx: filenameext.ml filenameext.cmi
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -thread -c -I ../uuid -o $@ $<
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -thread -c $(OCAML_UUID_INC) -o $@ $<
 
 %.cmx: %.ml %.cmi
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../uuid -c -o $@ $<
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAML_UUID_INC) -c -o $@ $<
 
 %.o: %.c
        $(CC) $(CFLAGS) -c -o $@ $<
diff -r c6eaf00013e1 -r 1c6d162d4b35 stunnel/Makefile
--- a/stunnel/Makefile  Mon Jan 10 04:16:04 2011 -0500
+++ b/stunnel/Makefile  Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
@@ -31,13 +33,13 @@ stunnel.cma: $(foreach obj,$(OBJS),$(obj
        $(OCAMLC) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmo)
 
 %.cmo: %.ml
-       $(OCAMLC) -c -I ../stdext -I ../uuid -I ../log -o $@ $<
+       $(OCAMLC) -c -I ../stdext $(OCAML_UUID_INC) -I ../log -o $@ $<
 
 %.cmi: %.mli
-       $(OCAMLC) -c -I ../stdext -I ../uuid -o $@ $<
+       $(OCAMLC) -c -I ../stdext $(OCAML_UUID_INC) -o $@ $<
 
 %.cmx: %.ml
-       $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -I ../stdext -I ../uuid -I ../log -o $@ 
$<
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -c -I ../stdext $(OCAML_UUID_INC) -I 
../log -o $@ $<
 
 %.o: %.c
        $(CC) $(CFLAGS) -c -o $@ $<
diff -r c6eaf00013e1 -r 1c6d162d4b35 tapctl/Makefile
--- a/tapctl/Makefile   Mon Jan 10 04:16:04 2011 -0500
+++ b/tapctl/Makefile   Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 tests/Makefile
--- a/tests/Makefile    Mon Jan 10 04:16:04 2011 -0500
+++ b/tests/Makefile    Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 OCAMLC = ocamlfind ocamlc -g -package "unix,stdext,xc,xb,xs,mmap"
 OCAMLOPT = ocamlfind ocamlopt -package "unix,stdext,xc,xb,xs,mmap"
 
diff -r c6eaf00013e1 -r 1c6d162d4b35 uuid/Makefile
--- a/uuid/Makefile     Mon Jan 10 04:16:04 2011 -0500
+++ b/uuid/Makefile     Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 vhd/Makefile
--- a/vhd/Makefile      Mon Jan 10 04:16:04 2011 -0500
+++ b/vhd/Makefile      Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,4 @@
+include ../config.mk
 
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
diff -r c6eaf00013e1 -r 1c6d162d4b35 xb/Makefile
--- a/xb/Makefile       Mon Jan 10 04:16:04 2011 -0500
+++ b/xb/Makefile       Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml -I$(XEN_ROOT)/usr/include -I../mmap
 OCAMLC = ocamlc -g -I ../mmap
diff -r c6eaf00013e1 -r 1c6d162d4b35 xc/Makefile
--- a/xc/Makefile       Mon Jan 10 04:16:04 2011 -0500
+++ b/xc/Makefile       Mon Jan 10 04:16:50 2011 -0500
@@ -1,8 +1,10 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml -I$(XEN_ROOT)/usr/include -I../mmap 
-I./
-OCAMLC = ocamlc -g -I ../mmap -I ../uuid
+OCAMLC = ocamlc -g -I ../mmap $(OCAML_UUID_INC)
 OCAMLOPT = ocamlopt
-OCAMLOPTFLAGS = -g -dtypes -I ../mmap -I ../uuid
+OCAMLOPTFLAGS = -g -dtypes -I ../mmap $(OCAML_UUID_INC)
 
 LDFLAGS = -cclib -L./
 
diff -r c6eaf00013e1 -r 1c6d162d4b35 xen-utils/Makefile
--- a/xen-utils/Makefile        Mon Jan 10 04:16:04 2011 -0500
+++ b/xen-utils/Makefile        Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml -I$(XEN_ROOT)/usr/include
 OCAMLC = ocamlc -g
diff -r c6eaf00013e1 -r 1c6d162d4b35 xml-light2/Makefile
--- a/xml-light2/Makefile       Mon Jan 10 04:16:04 2011 -0500
+++ b/xml-light2/Makefile       Mon Jan 10 04:16:50 2011 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755
 OCAMLPACKS = xmlm
 
diff -r c6eaf00013e1 -r 1c6d162d4b35 xs/Makefile
--- a/xs/Makefile       Mon Jan 10 04:16:04 2011 -0500
+++ b/xs/Makefile       Mon Jan 10 04:16:50 2011 -0500
@@ -1,12 +1,14 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
-OCAMLC = ocamlc -g -I ../xb/
+OCAMLC = ocamlc -g $(OCAML_XB_INC)
 OCAMLOPT = ocamlopt
 
 LDFLAGS = -cclib -L./
 
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
-OCAMLOPTFLAGS = -g -dtypes -I ../xb/
+OCAMLOPTFLAGS = -g -dtypes $(OCAML_XB_INC)
 
 OCAMLABI := $(shell ocamlc -version)
 OCAMLLIBDIR := $(shell ocamlc -where)
diff -r c6eaf00013e1 -r 1c6d162d4b35 xsrpc/Makefile
--- a/xsrpc/Makefile    Mon Jan 10 04:16:04 2011 -0500
+++ b/xsrpc/Makefile    Mon Jan 10 04:16:50 2011 -0500
@@ -1,12 +1,14 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
-OCAMLC = ocamlc -g -I ../xb/ -I ../xs/
+OCAMLC = ocamlc -g $(OCAML_XB_INC) $(OCAML_XS_INC)
 OCAMLOPT = ocamlopt
 
 LDFLAGS = -cclib -L./
 
 VERSION := $(shell hg parents --template "{rev}" 2>/dev/null || echo 0.0)
-OCAMLOPTFLAGS = -g -dtypes -I ../xb/ -I ../xs/
+OCAMLOPTFLAGS = -g -dtypes $(OCAML_XB_INC) $(OCAML_XS_INC)
 
 OCAMLABI := $(shell ocamlc -version)
 OCAMLLIBDIR := $(shell ocamlc -where)

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

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