mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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=
|
||||
|
||||
Reference in New Issue
Block a user