mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
ocaml: fix build with Bytes fallback
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 61d4891ef4.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ SOURCES_MLI = \
|
||||
xpath_helpers.mli
|
||||
|
||||
SOURCES_ML = \
|
||||
$(OCAML_BYTES_COMPAT_ML) \
|
||||
common_gettext.ml \
|
||||
getopt.ml \
|
||||
common_utils.ml \
|
||||
|
||||
Reference in New Issue
Block a user