[Libguestfs] [PATCH 2/2] ocaml: fix build with Bytes fallback
Pino Toscano
ptoscano at redhat.com
Tue Jul 11 13:33:57 UTC 2017
Place the Bytes fallback module in the right place (mlstdutils), with no
need to make it available directly also for generation, since it uses
mlstdutils now.
Fixes commit 61d4891ef48df171a27873efe90aab51a9b711ef.
---
.gitignore | 3 +--
generator/Makefile.am | 2 +-
m4/guestfs_ocaml.m4 | 14 +++++---------
mllib/Makefile.am | 1 -
4 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index 23cefcb..bbd9284 100644
--- a/.gitignore
+++ b/.gitignore
@@ -125,6 +125,7 @@ Makefile.in
/common/miniexpect/miniexpect.3
/common/mlprogress/.depend
/common/mlstdutils/.depend
+/common/mlstdutils/bytes.ml
/common/mlstdutils/guestfs_config.ml
/common/mlstdutils/libdir.ml
/common/mlstdutils/oUnit-*
@@ -275,7 +276,6 @@ Makefile.in
/fuse/test-guestmount-fd
/fuse/test-guestunmount-fd
/generator/.depend
-/generator/bytes.ml
/generator/common_utils.ml
/generator/common_utils.mli
/generator/files-generated.txt
@@ -366,7 +366,6 @@ Makefile.in
/make-fs/virt-make-fs.1
/missing
/mllib/.depend
-/mllib/bytes.ml
/mllib/common_gettext.ml
/mllib/common_utils_tests
/mllib/getopt_tests
diff --git a/generator/Makefile.am b/generator/Makefile.am
index 401029d..3f54ad5 100644
--- a/generator/Makefile.am
+++ b/generator/Makefile.am
@@ -114,7 +114,7 @@ sources = \
# In build dependency order.
objects = \
- $(OCAML_GENERATOR_BYTES_COMPAT_CMO) \
+ $(OCAML_BYTES_COMPAT_CMO) \
../common/mlstdutils/guestfs_config.cmo \
../common/mlstdutils/std_utils.cmo \
types.cmo \
diff --git a/m4/guestfs_ocaml.m4 b/m4/guestfs_ocaml.m4
index d8bd89f..c18a3de 100644
--- a/m4/guestfs_ocaml.m4
+++ b/m4/guestfs_ocaml.m4
@@ -113,27 +113,23 @@ AM_CONDITIONAL([HAVE_OCAML_GETTEXT],
[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno" && test "x$OCAML_PKG_gettext" != "xno" && test "x$OCAML_GETTEXT" != "xno"])
dnl Create the backwards compatibility Bytes module for OCaml < 4.02.
-mkdir -p generator mllib
-rm -f generator/bytes.ml mllib/bytes.ml
+mkdir -p common/mlstdutils
+rm -f common/mlstdutils/bytes.ml
AS_IF([test "x$have_Bytes_module" = "xno"],[
- cat > generator/bytes.ml <<EOF
+ cat > common/mlstdutils/bytes.ml <<EOF
include String
let of_string = String.copy
let to_string = String.copy
let sub_string = String.sub
EOF
- ln -s ../generator/bytes.ml mllib/bytes.ml
- OCAML_GENERATOR_BYTES_COMPAT_CMO='$(top_builddir)/generator/bytes.cmo'
- OCAML_BYTES_COMPAT_CMO='$(top_builddir)/mllib/bytes.cmo'
- OCAML_BYTES_COMPAT_ML='$(top_builddir)/mllib/bytes.ml'
+ OCAML_BYTES_COMPAT_CMO='$(top_builddir)/common/mlstdutils/bytes.cmo'
+ OCAML_BYTES_COMPAT_ML='$(top_builddir)/common/mlstdutils/bytes.ml'
safe_string_option=
],[
- OCAML_GENERATOR_BYTES_COMPAT_CMO=
OCAML_BYTES_COMPAT_CMO=
OCAML_BYTES_COMPAT_ML=
safe_string_option="-safe-string"
])
-AC_SUBST([OCAML_GENERATOR_BYTES_COMPAT_CMO])
AC_SUBST([OCAML_BYTES_COMPAT_CMO])
AC_SUBST([OCAML_BYTES_COMPAT_ML])
diff --git a/mllib/Makefile.am b/mllib/Makefile.am
index ad86ac5..49bd5e7 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
@@ -39,7 +39,6 @@ SOURCES_MLI = \
xpath_helpers.mli
SOURCES_ML = \
- $(OCAML_BYTES_COMPAT_ML) \
common_gettext.ml \
getopt.ml \
common_utils.ml \
--
2.9.4
More information about the Libguestfs
mailing list