Richard W.M. Jones
2018-Feb-08 17:10 UTC
[Libguestfs] [ for 1.38] ocaml: When creating compat Bytes module, create bytes.mli file.
On distros with OCaml < 4.02 we need to create a compatibility Bytes module. However we didn't create the interface file (bytes.mli) which would mean that dependencies wouldn't be created correctly for parallel builds. This commit uses ‘ocaml -i’ to create an interface file which exports everything. --- .gitignore | 1 + m4/guestfs-ocaml.m4 | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 233a8c536..bb7026537 100644 --- a/.gitignore +++ b/.gitignore @@ -139,6 +139,7 @@ Makefile.in /common/mlprogress/.depend /common/mlstdutils/.depend /common/mlstdutils/bytes.ml +/common/mlstdutils/bytes.mli /common/mlstdutils/guestfs_config.ml /common/mlstdutils/oUnit-* /common/mlstdutils/std_utils_tests diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 index 94c24bc04..e08f40a02 100644 --- a/m4/guestfs-ocaml.m4 +++ b/m4/guestfs-ocaml.m4 @@ -175,7 +175,7 @@ AM_CONDITIONAL([HAVE_OCAML_GETTEXT], dnl Create the backwards compatibility Bytes module for OCaml < 4.02. mkdir -p common/mlstdutils -rm -f common/mlstdutils/bytes.ml +rm -f common/mlstdutils/bytes.ml common/mlstdutils/bytes.mli AS_IF([test "x$have_Bytes_module" = "xno"],[ cat > common/mlstdutils/bytes.ml <<EOF include String @@ -183,6 +183,7 @@ let of_string = String.copy let to_string = String.copy let sub_string = String.sub EOF + $OCAMLC -i common/mlstdutils/bytes.ml > common/mlstdutils/bytes.mli OCAML_BYTES_COMPAT_CMO='$(top_builddir)/common/mlstdutils/bytes.cmo' OCAML_BYTES_COMPAT_ML='$(top_builddir)/common/mlstdutils/bytes.ml' safe_string_option-- 2.14.3
Pino Toscano
2018-Feb-08 17:31 UTC
Re: [Libguestfs] [ for 1.38] ocaml: When creating compat Bytes module, create bytes.mli file.
On Thursday, 8 February 2018 18:10:01 CET Richard W.M. Jones wrote:> On distros with OCaml < 4.02 we need to create a compatibility Bytes > module. However we didn't create the interface file (bytes.mli) which > would mean that dependencies wouldn't be created correctly for > parallel builds. This commit uses ‘ocaml -i’ to create an interface > file which exports everything. > ---LGTM. -- Pino Toscano
Possibly Parallel Threads
- [PATCH 2/2] ocaml: fix build with Bytes fallback
- [PATCH] common/mlstdutils: Add chomp function to remove \n from end of strings.
- Re: [PATCH v2] common/mlstdutils: Build a bytecode version of this library.
- [PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
- [PATCH v2] daemon: build also without Hivex.OPEN_UNSAFE (RHBZ#1493048)