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 3 of 5] add configure-time option to use system install

To: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 3 of 5] add configure-time option to use system installed Xen library bindings
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 07 Dec 2010 14:33:02 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 07 Dec 2010 06:51:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1291732379@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.1291732379@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.5.2
# HG changeset patch
# User root@xxxxxxxxxxxxxxxxxxxxx
# Date 1291731529 18000
# Node ID 4ddc7e5613c08fc203c13c55bbb84d2935f57c9b
# Parent  cc5f6f7e18cf39cf8ed9112c52aebb9c1317f8f9
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 cc5f6f7e18cf -r 4ddc7e5613c0 Makefile.in
--- a/Makefile.in       Tue Dec 07 09:18:49 2010 -0500
+++ b/Makefile.in       Tue Dec 07 09:18:49 2010 -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,21 +40,29 @@ 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 xcext
        $(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
@@ -77,21 +89,29 @@ 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 xcext install
        $(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
@@ -118,14 +138,20 @@ 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
        $(MAKE) -C xcext uninstall
+ifeq ($(WITH_XEN_SYSTEM_BINDINGS),0)
        $(MAKE) -C mmap uninstall
+endif
        $(MAKE) -C cpuid uninstall
        $(MAKE) -C vhd uninstall
        $(MAKE) -C tapctl uninstall
@@ -156,25 +182,33 @@ 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 xcext doc
        $(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
@@ -185,7 +219,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
@@ -207,14 +243,20 @@ 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 xcext clean
        $(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 cc5f6f7e18cf -r 4ddc7e5613c0 camldm/Makefile
--- a/camldm/Makefile   Tue Dec 07 09:18:49 2010 -0500
+++ b/camldm/Makefile   Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 cdrom/Makefile
--- a/cdrom/Makefile    Tue Dec 07 09:18:49 2010 -0500
+++ b/cdrom/Makefile    Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 close-and-exec/Makefile
--- a/close-and-exec/Makefile   Tue Dec 07 09:18:49 2010 -0500
+++ b/close-and-exec/Makefile   Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 -o root -g root
 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 cc5f6f7e18cf -r 4ddc7e5613c0 configure.ac
--- a/configure.ac      Tue Dec 07 09:18:49 2010 -0500
+++ b/configure.ac      Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 cpuid/Makefile
--- a/cpuid/Makefile    Tue Dec 07 09:18:49 2010 -0500
+++ b/cpuid/Makefile    Tue Dec 07 09:18:49 2010 -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 ../xcext -I ../xen-utils
+INCLUDES = -I ../stdext $(OCAML_XC_INC) -I ../xcext -I ../xen-utils
 
 LDFLAGS = -cclib -L./
 
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 doc/Makefile
--- a/doc/Makefile      Tue Dec 07 09:18:49 2010 -0500
+++ b/doc/Makefile      Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 .PHONY: clean
 clean:
        rm -rf components.js content
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 eventchn/Makefile
--- a/eventchn/Makefile Tue Dec 07 09:18:49 2010 -0500
+++ b/eventchn/Makefile Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 forking_executioner/Makefile
--- a/forking_executioner/Makefile      Tue Dec 07 09:18:49 2010 -0500
+++ b/forking_executioner/Makefile      Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 -o root -g root
 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 cc5f6f7e18cf -r 4ddc7e5613c0 http-svr/Makefile
--- a/http-svr/Makefile Tue Dec 07 09:18:49 2010 -0500
+++ b/http-svr/Makefile Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 log/Makefile
--- a/log/Makefile      Tue Dec 07 09:18:49 2010 -0500
+++ b/log/Makefile      Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 mk/Makefile
--- a/mk/Makefile       Tue Dec 07 09:18:49 2010 -0500
+++ b/mk/Makefile       Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 ifdef B_BASE
 include $(B_BASE)/common.mk
 include $(B_BASE)/rpmbuild.mk
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 mlvm/Makefile
--- a/mlvm/Makefile     Tue Dec 07 09:18:49 2010 -0500
+++ b/mlvm/Makefile     Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 mmap/Makefile
--- a/mmap/Makefile     Tue Dec 07 09:18:49 2010 -0500
+++ b/mmap/Makefile     Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 netdev/Makefile
--- a/netdev/Makefile   Tue Dec 07 09:18:49 2010 -0500
+++ b/netdev/Makefile   Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 pciutil/Makefile
--- a/pciutil/Makefile  Tue Dec 07 09:18:49 2010 -0500
+++ b/pciutil/Makefile  Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 -o root -g root
 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 cc5f6f7e18cf -r 4ddc7e5613c0 rpc-light/Makefile
--- a/rpc-light/Makefile        Tue Dec 07 09:18:49 2010 -0500
+++ b/rpc-light/Makefile        Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 OCAMLC = ocamlfind ocamlc
 OCAMLOPT = ocamlfind ocamlopt
 OCAMLFLAGS = -annot -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 rss/Makefile
--- a/rss/Makefile      Tue Dec 07 09:18:49 2010 -0500
+++ b/rss/Makefile      Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 sexpr/Makefile
--- a/sexpr/Makefile    Tue Dec 07 09:18:49 2010 -0500
+++ b/sexpr/Makefile    Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 -o root -g root
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 stdext/Makefile
--- a/stdext/Makefile   Tue Dec 07 09:18:49 2010 -0500
+++ b/stdext/Makefile   Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 -o root -g root
 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 cc5f6f7e18cf -r 4ddc7e5613c0 stunnel/Makefile
--- a/stunnel/Makefile  Tue Dec 07 09:18:49 2010 -0500
+++ b/stunnel/Makefile  Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 tapctl/Makefile
--- a/tapctl/Makefile   Tue Dec 07 09:18:49 2010 -0500
+++ b/tapctl/Makefile   Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/usr/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 tests/Makefile
--- a/tests/Makefile    Tue Dec 07 09:18:49 2010 -0500
+++ b/tests/Makefile    Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 uuid/Makefile
--- a/uuid/Makefile     Tue Dec 07 09:18:49 2010 -0500
+++ b/uuid/Makefile     Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 CC = gcc
 CFLAGS = -Wall -fPIC -O2 -I/opt/xensource/lib/ocaml
 OCAMLC = ocamlc -g
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 vhd/Makefile
--- a/vhd/Makefile      Tue Dec 07 09:18:49 2010 -0500
+++ b/vhd/Makefile      Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 xb/Makefile
--- a/xb/Makefile       Tue Dec 07 09:18:49 2010 -0500
+++ b/xb/Makefile       Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 xc/Makefile
--- a/xc/Makefile       Tue Dec 07 09:18:49 2010 -0500
+++ b/xc/Makefile       Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 xcext/Makefile
--- a/xcext/Makefile    Tue Dec 07 09:18:49 2010 -0500
+++ b/xcext/Makefile    Tue Dec 07 09:18:49 2010 -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 -I ../xc
+OCAMLC = ocamlc -g -I ../mmap -I ../uuid $(OCAML_XC_INC)
 OCAMLOPT = ocamlopt
-OCAMLOPTFLAGS = -g -dtypes -I ../mmap -I ../uuid -I ../xc
+OCAMLOPTFLAGS = -g -dtypes -I ../mmap -I ../uuid $(OCAML_XC_INC)
 
 LDFLAGS = -cclib -L./
 
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 xen-utils/Makefile
--- a/xen-utils/Makefile        Tue Dec 07 09:18:49 2010 -0500
+++ b/xen-utils/Makefile        Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 xml-light2/Makefile
--- a/xml-light2/Makefile       Tue Dec 07 09:18:49 2010 -0500
+++ b/xml-light2/Makefile       Tue Dec 07 09:18:49 2010 -0500
@@ -1,3 +1,5 @@
+include ../config.mk
+
 IPROG=install -m 755 -o root -g root
 OCAMLPACKS = xmlm
 
diff -r cc5f6f7e18cf -r 4ddc7e5613c0 xs/Makefile
--- a/xs/Makefile       Tue Dec 07 09:18:49 2010 -0500
+++ b/xs/Makefile       Tue Dec 07 09:18:49 2010 -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 cc5f6f7e18cf -r 4ddc7e5613c0 xsrpc/Makefile
--- a/xsrpc/Makefile    Tue Dec 07 09:18:49 2010 -0500
+++ b/xsrpc/Makefile    Tue Dec 07 09:18:49 2010 -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>