tools: update ocamlfind handling
PATCH 1/1 tools: update ocamlfind handling
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1359641034 -3600
# Node ID b5de88e7e5c8a30be26f0d2207132b14b970ffcb # Parent 6727070b4129cf852199b66b6a81042ee6966a98
tools: update ocamlfind handling
configure checks just for ocamlc, but the tools in tools/ocaml depend also on ocamlfind. On my workstation I have just ocamlc installed, but no ocamlfind. As a result make will fail.
Update configure.ac to check also for OCAMLFIND, update various Makefiles and replace hardcoded ocamlfind string with $(OCAMLFIND)
Please rerun autogen after applying this (untested) patch.
tools/configure.ac +2 -1
@@ -85,7 +85,8 @@ AS_IF([test "x$xapi" = "xy"], [ ]) AS_IF([test "x$ocamltools" = "xy"], [ AC_PROG_OCAML - AS_IF([test "x$OCAMLC" = "xno"], [ + AC_PROG_FINDLIB + AS_IF([test "x$OCAMLC" = "xno" && test "$OCAMLFIND" = "xno"], [ AS_IF([test "x$enable_ocamltools" = "xyes"], [ AC_MSG_ERROR([Ocaml tools enabled, but unable to find Ocaml])]) ocamltools="n"
tools/ocaml/common.make +2 -1
@@ -7,6 +7,7 @@ OCAMLMKLIB ?= ocamlmklib OCAMLDEP ?= ocamldep OCAMLLEX ?= ocamllex OCAMLYACC ?= ocamlyacc +OCAMLFIND ?= ocamlfind CFLAGS += -fPIC -Werror -I$(shell ocamlc -where)
@@ -16,6 +17,6 @@ OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F - VERSION := 4.1 -OCAMLDESTDIR ?= $(DESTDIR)$(shell ocamlfind printconf destdir) +OCAMLDESTDIR ?= $(DESTDIR)$(shell $(OCAMLFIND) printconf destdir) o= >[email protected] && mv -f [email protected] $@
tools/ocaml/libs/eventchn/Makefile +3 -3
@@ -24,12 +24,12 @@ OCAML_LIBRARY = xeneventchn .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xeneventchn - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xeneventchn META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xeneventchn + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xeneventchn META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xeneventchn + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xeneventchn include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/mmap/Makefile +3 -3
@@ -19,12 +19,12 @@ OCAML_LIBRARY = xenmmap .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenmmap - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenmmap META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenmmap META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenmmap + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xb/Makefile +3 -3
@@ -45,11 +45,11 @@ xenbus.cmo : $(foreach obj, $(OBJS), $(o .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenbus - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenbus META $(LIBS) xenbus.cmo xenbus.cmi xenbus.cmx *.a *.so + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenbus + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenbus META $(LIBS) xenbus.cmo xenbus.cmi xenbus.cmx *.a *.so .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenbus + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenbus include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xc/Makefile +3 -3
@@ -23,11 +23,11 @@ libs: $(LIBS) .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenctrl - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenctrl META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenctrl META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenctrl + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xl/Makefile +3 -3
@@ -56,11 +56,11 @@ libs: $(LIBS) .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenlight - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenlight META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenlight META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenlight + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xs/Makefile +3 -3
@@ -36,12 +36,12 @@ xenstore.cmo : $(foreach obj, $(OBJS), $ .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenstore - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenstore META $(LIBS) xenstore.cmo xenstore.cmi xenstore.cmx *.a + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenstore META $(LIBS) xenstore.cmo xenstore.cmi xenstore.cmx *.a .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenstore + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore include $(TOPLEVEL)/Makefile.rules
PATCH v2 1/1 tools: update ocamlfind handling
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1359642490 -3600
# Node ID 10d9f4caffa8986185b9f8824bd5bf0bb41de660 # Parent 6727070b4129cf852199b66b6a81042ee6966a98
tools: update ocamlfind handling
configure checks just for ocamlc, but the tools in tools/ocaml depend also on ocamlfind. On my workstation I have just ocamlc installed, but no ocamlfind. As a result make will fail.
Update configure.ac to check also for OCAMLFIND, update various Makefiles and replace hardcoded ocamlfind string with $(OCAMLFIND)
Please rerun autogen.sh after applying this patch.
v2:
- fix logic error in configure.ac
tools/configure.ac +2 -1
@@ -85,7 +85,8 @@ AS_IF([test "x$xapi" = "xy"], [ ]) AS_IF([test "x$ocamltools" = "xy"], [ AC_PROG_OCAML - AS_IF([test "x$OCAMLC" = "xno"], [ + AC_PROG_FINDLIB + AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [ AS_IF([test "x$enable_ocamltools" = "xyes"], [ AC_MSG_ERROR([Ocaml tools enabled, but unable to find Ocaml])]) ocamltools="n"
tools/ocaml/common.make +2 -1
@@ -7,6 +7,7 @@ OCAMLMKLIB ?= ocamlmklib OCAMLDEP ?= ocamldep OCAMLLEX ?= ocamllex OCAMLYACC ?= ocamlyacc +OCAMLFIND ?= ocamlfind CFLAGS += -fPIC -Werror -I$(shell ocamlc -where)
@@ -16,6 +17,6 @@ OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F - VERSION := 4.1 -OCAMLDESTDIR ?= $(DESTDIR)$(shell ocamlfind printconf destdir) +OCAMLDESTDIR ?= $(DESTDIR)$(shell $(OCAMLFIND) printconf destdir) o= >[email protected] && mv -f [email protected] $@
tools/ocaml/libs/eventchn/Makefile +3 -3
@@ -24,12 +24,12 @@ OCAML_LIBRARY = xeneventchn .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xeneventchn - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xeneventchn META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xeneventchn + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xeneventchn META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xeneventchn + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xeneventchn include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/mmap/Makefile +3 -3
@@ -19,12 +19,12 @@ OCAML_LIBRARY = xenmmap .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenmmap - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenmmap META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenmmap META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenmmap + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xb/Makefile +3 -3
@@ -45,11 +45,11 @@ xenbus.cmo : $(foreach obj, $(OBJS), $(o .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenbus - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenbus META $(LIBS) xenbus.cmo xenbus.cmi xenbus.cmx *.a *.so + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenbus + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenbus META $(LIBS) xenbus.cmo xenbus.cmi xenbus.cmx *.a *.so .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenbus + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenbus include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xc/Makefile +3 -3
@@ -23,11 +23,11 @@ libs: $(LIBS) .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenctrl - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenctrl META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenctrl META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenctrl + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenctrl include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xl/Makefile +3 -3
@@ -56,11 +56,11 @@ libs: $(LIBS) .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenlight - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenlight META $(INTF) $(LIBS) *.a *.so *.cmx + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenlight META $(INTF) $(LIBS) *.a *.so *.cmx .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenlight + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenlight include $(TOPLEVEL)/Makefile.rules
tools/ocaml/libs/xs/Makefile +3 -3
@@ -36,12 +36,12 @@ xenstore.cmo : $(foreach obj, $(OBJS), $ .PHONY: install install: $(LIBS) META mkdir -p $(OCAMLDESTDIR) - ocamlfind remove -destdir $(OCAMLDESTDIR) xenstore - ocamlfind install -destdir $(OCAMLDESTDIR) -ldconf ignore xenstore META $(LIBS) xenstore.cmo xenstore.cmi xenstore.cmx *.a + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore + $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenstore META $(LIBS) xenstore.cmo xenstore.cmi xenstore.cmx *.a .PHONY: uninstall uninstall: - ocamlfind remove -destdir $(OCAMLDESTDIR) xenstore + $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenstore include $(TOPLEVEL)/Makefile.rules
Quoted 14 lines · Olaf Hering
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1359642490 -3600
# Node ID10d9f4caffa8986185b9f8824bd5bf0bb41de660# Parent6727070b4129cf852199b66b6a81042ee6966a98
tools: update ocamlfind handlingconfigure checks just for ocamlc, but the tools in
tools/ocamldepend also on ocamlfind. On my workstation I have just ocamlc installed, but no ocamlfind. As a result make will fail.Update configure.ac to check also for OCAMLFIND, update various Makefiles and replace hardcoded ocamlfind string with $(OCAMLFIND)
Quoted 6 lines
Please rerun
autogen.shafter applying this patch.v2:
- fix logic error in configure.acSigned-off-by Olaf Hering <[email protected]>
Acked + applied, thanks.