[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools: update ocamlfind handling


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Wed, 06 Feb 2013 10:00:14 +0000
  • Delivery-date: Wed, 06 Feb 2013 10:00:25 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1360063871 0
# Node ID 66346dcae70f31a5989094bedfcbde7e7d5955ad
# Parent  00c7736b6ec5652ace3511be897a3475a36002f5
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.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 00c7736b6ec5 -r 66346dcae70f tools/configure
--- a/tools/configure   Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/configure   Tue Feb 05 11:31:11 2013 +0000
@@ -620,6 +620,7 @@ GREP
 CPP
 pyconfig
 PYTHONPATH
+OCAMLFIND
 OCAMLBUILD
 OCAMLDOC
 OCAMLMKLIB
@@ -4796,7 +4797,103 @@ else
 fi
 
 
-    if test "x$OCAMLC" = "xno"; then :
+
+  # checking for ocamlfind
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ocamlfind", so it can be a 
program name with args.
+set dummy ${ac_tool_prefix}ocamlfind; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OCAMLFIND+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OCAMLFIND"; then
+  ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_OCAMLFIND="${ac_tool_prefix}ocamlfind"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+OCAMLFIND=$ac_cv_prog_OCAMLFIND
+if test -n "$OCAMLFIND"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5
+$as_echo "$OCAMLFIND" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OCAMLFIND"; then
+  ac_ct_OCAMLFIND=$OCAMLFIND
+  # Extract the first word of "ocamlfind", so it can be a program name with 
args.
+set dummy ocamlfind; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OCAMLFIND+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OCAMLFIND"; then
+  ac_cv_prog_ac_ct_OCAMLFIND="$ac_ct_OCAMLFIND" # Let the user override the 
test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OCAMLFIND="ocamlfind"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OCAMLFIND=$ac_cv_prog_ac_ct_OCAMLFIND
+if test -n "$ac_ct_OCAMLFIND"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OCAMLFIND" >&5
+$as_echo "$ac_ct_OCAMLFIND" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OCAMLFIND" = x; then
+    OCAMLFIND="no"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not 
prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" 
>&2;}
+ac_tool_warned=yes ;;
+esac
+    OCAMLFIND=$ac_ct_OCAMLFIND
+  fi
+else
+  OCAMLFIND="$ac_cv_prog_OCAMLFIND"
+fi
+
+
+
+    if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
 
         if test "x$enable_ocamltools" = "xyes"; then :
 
diff -r 00c7736b6ec5 -r 66346dcae70f tools/configure.ac
--- a/tools/configure.ac        Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/configure.ac        Tue Feb 05 11:31:11 2013 +0000
@@ -86,7 +86,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"
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/common.make
--- a/tools/ocaml/common.make   Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/common.make   Tue Feb 05 11:31:11 2013 +0000
@@ -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= >$@.new && mv -f $@.new $@
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/libs/eventchn/Makefile
--- a/tools/ocaml/libs/eventchn/Makefile        Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/libs/eventchn/Makefile        Tue Feb 05 11:31:11 2013 +0000
@@ -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
 
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/libs/mmap/Makefile
--- a/tools/ocaml/libs/mmap/Makefile    Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/libs/mmap/Makefile    Tue Feb 05 11:31:11 2013 +0000
@@ -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
 
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/libs/xb/Makefile
--- a/tools/ocaml/libs/xb/Makefile      Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/libs/xb/Makefile      Tue Feb 05 11:31:11 2013 +0000
@@ -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
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/libs/xc/Makefile
--- a/tools/ocaml/libs/xc/Makefile      Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/libs/xc/Makefile      Tue Feb 05 11:31:11 2013 +0000
@@ -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
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/libs/xl/Makefile
--- a/tools/ocaml/libs/xl/Makefile      Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/libs/xl/Makefile      Tue Feb 05 11:31:11 2013 +0000
@@ -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
diff -r 00c7736b6ec5 -r 66346dcae70f tools/ocaml/libs/xs/Makefile
--- a/tools/ocaml/libs/xs/Makefile      Tue Feb 05 11:31:10 2013 +0000
+++ b/tools/ocaml/libs/xs/Makefile      Tue Feb 05 11:31:11 2013 +0000
@@ -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
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.