Pino Toscano
2017-Jul-11 13:33 UTC
[Libguestfs] [PATCH 1/2] builder: fix paths to mlstdutils & mlutils
Followup/fix of commit 61d4891ef48df171a27873efe90aab51a9b711ef. --- builder/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/Makefile.am b/builder/Makefile.am index 09ae4ae..e64c899 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -311,7 +311,7 @@ depend: .depend .depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) -I $(abs_top_builddir)/mlstdutils -I $(abs_top_builddir)/mlutils -I $(abs_top_builddir)/mllib -I $(abs_top_builddir)/customize $^ | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) -I $(abs_top_builddir)/common/mlstdutils -I $(abs_top_builddir)/common/mlutils -I $(abs_top_builddir)/mllib -I $(abs_top_builddir)/customize $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ -- 2.9.4
Pino Toscano
2017-Jul-11 13:33 UTC
[Libguestfs] [PATCH 2/2] 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 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
Richard W.M. Jones
2017-Jul-11 21:27 UTC
Re: [Libguestfs] [PATCH 2/2] ocaml: fix build with Bytes fallback
On Tue, Jul 11, 2017 at 03:33:57PM +0200, Pino Toscano wrote:> 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.ACK both. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Reasonably Related Threads
- [PATCH 1/2] builder: fix paths to mlstdutils & mlutils
- [ for 1.38] ocaml: When creating compat Bytes module, create bytes.mli file.
- [PATCH 2/3] Convert source so it can be compiled with OCaml '-safe-string' option.
- [PATCH] common/mlstdutils: Fix parallel builds of bytes.ml.
- [PATCH 01/27] build: Make OCaml compiler required for all builds.