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:
Pino Toscano
2017-07-11 15:21:02 +02:00
parent 178a20f6c3
commit a1c559a0f4
4 changed files with 7 additions and 13 deletions

3
.gitignore vendored
View File

@@ -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

View File

@@ -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 \

View File

@@ -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])

View File

@@ -39,7 +39,6 @@ SOURCES_MLI = \
xpath_helpers.mli
SOURCES_ML = \
$(OCAML_BYTES_COMPAT_ML) \
common_gettext.ml \
getopt.ml \
common_utils.ml \