[Libguestfs] [PATCH 4/5] Rename mllib -> common/mltools.

Richard W.M. Jones rjones at redhat.com
Tue Sep 26 12:16:14 UTC 2017


This directory which previously contained random modules and functions
now has an official purpose: to be the place for any OCaml utility
needed by the OCaml virt tools.

This is just code movement, I didn't (yet) rename or move any of the
modules.
---
 .gitignore                                      | 10 ++---
 Makefile.am                                     |  8 ++--
 builder/Makefile.am                             |  8 ++--
 {mllib => common/mltools}/JSON.ml               |  0
 {mllib => common/mltools}/JSON.mli              |  0
 {mllib => common/mltools}/JSON_tests.ml         |  4 +-
 {mllib => common/mltools}/Makefile.am           | 52 ++++++++++++-------------
 {mllib => common/mltools}/URI.ml                |  0
 {mllib => common/mltools}/URI.mli               |  0
 {mllib => common/mltools}/checksums.ml          |  0
 {mllib => common/mltools}/checksums.mli         |  0
 {mllib => common/mltools}/common_utils-c.c      |  0
 {mllib => common/mltools}/common_utils.ml       |  0
 {mllib => common/mltools}/common_utils.mli      |  0
 {mllib => common/mltools}/common_utils_tests.ml |  0
 {mllib => common/mltools}/curl.ml               |  0
 {mllib => common/mltools}/curl.mli              |  0
 {mllib => common/mltools}/dummy.c               |  0
 {mllib => common/mltools}/getopt-c.c            |  0
 {mllib => common/mltools}/getopt.ml             |  0
 {mllib => common/mltools}/getopt.mli            |  0
 {mllib => common/mltools}/getopt_tests.ml       |  0
 {mllib => common/mltools}/planner.ml            |  0
 {mllib => common/mltools}/planner.mli           |  0
 {mllib => common/mltools}/regedit.ml            |  0
 {mllib => common/mltools}/regedit.mli           |  0
 {mllib => common/mltools}/registry.ml           |  0
 {mllib => common/mltools}/registry.mli          |  0
 {mllib => common/mltools}/test-getopt.sh        |  0
 {mllib => common/mltools}/uri-c.c               |  0
 {mllib => common/mltools}/xpath_helpers.ml      |  0
 {mllib => common/mltools}/xpath_helpers.mli     |  0
 common/options/display-options.c                |  2 +-
 configure.ac                                    |  2 +-
 customize/Makefile.am                           |  6 +--
 dib/Makefile.am                                 |  6 +--
 dib/output_format.mli                           |  2 +-
 docs/C_SOURCE_FILES                             |  8 ++--
 docs/guestfs-hacking.pod                        | 10 ++---
 get-kernel/Makefile.am                          |  6 +--
 ocaml-dep.sh.in                                 |  2 +-
 resize/Makefile.am                              |  6 +--
 sparsify/Makefile.am                            |  6 +--
 sysprep/Makefile.am                             |  6 +--
 sysprep/sysprep_operation.mli                   |  2 +-
 v2v/Makefile.am                                 |  8 ++--
 v2v/test-harness/Makefile.am                    |  2 +-
 47 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3ffa7302f..0932f9ea6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -134,6 +134,11 @@ Makefile.in
 /common/mlstdutils/guestfs_config.ml
 /common/mlstdutils/oUnit-*
 /common/mlstdutils/std_utils_tests
+/common/mltools/.depend
+/common/mltools/common_utils_tests
+/common/mltools/getopt_tests
+/common/mltools/JSON_tests
+/common/mltools/oUnit-*
 /common/mlutils/.depend
 /common/mlutils/c_utils_unit_tests
 /common/mlutils/oUnit-*
@@ -379,11 +384,6 @@ Makefile.in
 /make-fs/virt-make-fs
 /make-fs/virt-make-fs.1
 /missing
-/mllib/.depend
-/mllib/common_utils_tests
-/mllib/getopt_tests
-/mllib/JSON_tests
-/mllib/oUnit-*
 /ocaml-dep.sh
 /ocaml/bindtests.bc
 /ocaml/bindtests.opt
diff --git a/Makefile.am b/Makefile.am
index 913a40325..81b0058f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -155,14 +155,14 @@ endif
 # Unconditional because nothing is built yet.
 SUBDIRS += csharp
 
-# OCaml tools.  Note 'common/ml*', 'mllib' and 'customize' contain
-# shared code used by other OCaml tools, so these must come first.
+# OCaml tools.  Note 'common/ml*' and 'customize' contain shared code
+# used by other OCaml tools, so these must come first.
 if HAVE_OCAML
 SUBDIRS += common/mlgettext
 SUBDIRS += common/mlprogress
 SUBDIRS += common/mlvisit
 SUBDIRS += common/mlxml
-SUBDIRS += mllib
+SUBDIRS += common/mltools
 SUBDIRS += customize
 SUBDIRS += builder builder/templates
 SUBDIRS += get-kernel
@@ -351,7 +351,7 @@ po/POTFILES: configure.ac
 po/POTFILES-ml: configure.ac
 	rm -f $@ $@-t
 	cd $(srcdir); \
-	find builder common/ml* customize dib get-kernel mllib resize sparsify sysprep v2v -name '*.ml' | \
+	find builder common/ml* customize dib get-kernel resize sparsify sysprep v2v -name '*.ml' | \
 	grep -v '^builder/templates/' | \
 	LC_ALL=C sort > $@-t
 	mv $@-t $@
diff --git a/builder/Makefile.am b/builder/Makefile.am
index 2acc6022f..8407800d1 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -130,7 +130,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlutils \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
-	-I $(top_builddir)/mllib \
+	-I $(top_builddir)/common/mltools \
 	-I $(top_builddir)/customize
 OCAMLPACKAGES_TESTS =
 if HAVE_OCAML_PKG_GETTEXT
@@ -165,7 +165,7 @@ OCAMLLINKFLAGS = \
 	mlstdutils.$(MLARCHIVE) \
 	mlguestfs.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	customize.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
@@ -175,7 +175,7 @@ virt_builder_DEPENDENCIES = \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlstdutils/mlstdutils.$(MLARCHIVE) \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	../customize/customize.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_builder_LINK = \
@@ -249,7 +249,7 @@ yajl_tests_DEPENDENCIES = \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
 	../common/mlstdutils/mlstdutils.$(MLARCHIVE) \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	../customize/customize.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 yajl_tests_LINK = \
diff --git a/mllib/JSON.ml b/common/mltools/JSON.ml
similarity index 100%
rename from mllib/JSON.ml
rename to common/mltools/JSON.ml
diff --git a/mllib/JSON.mli b/common/mltools/JSON.mli
similarity index 100%
rename from mllib/JSON.mli
rename to common/mltools/JSON.mli
diff --git a/mllib/JSON_tests.ml b/common/mltools/JSON_tests.ml
similarity index 99%
rename from mllib/JSON_tests.ml
rename to common/mltools/JSON_tests.ml
index 281d38e0a..55a474474 100644
--- a/mllib/JSON_tests.ml
+++ b/common/mltools/JSON_tests.ml
@@ -1,4 +1,4 @@
-(* mllib
+(* mltools JSON tests
  * Copyright (C) 2015 Red Hat Inc.
  *
  * This program is free software; you can redistribute it and/or modify
@@ -221,7 +221,7 @@ let test_builder ctx =
 
 (* Suites declaration. *)
 let suite =
-  "mllib JSON" >:::
+  "mltools JSON" >:::
     [
       "basic.empty" >:: test_empty;
       "basic.string" >:: test_string;
diff --git a/mllib/Makefile.am b/common/mltools/Makefile.am
similarity index 87%
rename from mllib/Makefile.am
rename to common/mltools/Makefile.am
index f9f23c669..b00e126a1 100644
--- a/mllib/Makefile.am
+++ b/common/mltools/Makefile.am
@@ -51,9 +51,9 @@ SOURCES_ML = \
 	xpath_helpers.ml
 
 SOURCES_C = \
-	../common/options/decrypt.c \
-	../common/options/keys.c \
-	../common/options/uri.c \
+	../options/decrypt.c \
+	../options/keys.c \
+	../options/uri.c \
 	common_utils-c.c \
 	getopt-c.c \
 	uri-c.c
@@ -65,18 +65,18 @@ if HAVE_OCAML
 # objects and OCaml objects and link them into the OCaml library.
 # This C library is never used.
 
-noinst_LIBRARIES = libmllib.a
+noinst_LIBRARIES = libmltools.a
 
 if !HAVE_OCAMLOPT
-MLLIB_CMA = mllib.cma
+MLTOOLS_CMA = mltools.cma
 else
-MLLIB_CMA = mllib.cmxa
+MLTOOLS_CMA = mltools.cmxa
 endif
 
-noinst_DATA = $(MLLIB_CMA)
+noinst_DATA = $(MLTOOLS_CMA)
 
-libmllib_a_SOURCES = $(SOURCES_C)
-libmllib_a_CPPFLAGS = \
+libmltools_a_SOURCES = $(SOURCES_C)
+libmltools_a_CPPFLAGS = \
 	-I. \
 	-I$(top_builddir) \
 	-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
@@ -89,7 +89,7 @@ libmllib_a_CPPFLAGS = \
 	-I$(top_srcdir)/common/mlxml \
 	-I$(top_srcdir)/common/mlstdutils \
 	-I$(top_srcdir)/common/mlutils
-libmllib_a_CFLAGS = \
+libmltools_a_CFLAGS = \
 	$(WARN_CFLAGS) $(WERROR_CFLAGS) \
 	$(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \
 	-fPIC
@@ -112,7 +112,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlstdutils \
 	-I $(top_builddir)/common/mlutils \
 	-I $(builddir)
-OCAMLPACKAGES_TESTS = $(MLLIB_CMA)
+OCAMLPACKAGES_TESTS = $(MLTOOLS_CMA)
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
@@ -137,11 +137,11 @@ else
 OBJECTS = $(XOBJECTS)
 endif
 
-libmllib_a_DEPENDENCIES = $(OBJECTS)
+libmltools_a_DEPENDENCIES = $(OBJECTS)
 
-$(MLLIB_CMA): $(OBJECTS) libmllib.a
+$(MLTOOLS_CMA): $(OBJECTS) libmltools.a
 	$(OCAMLFIND) mklib $(OCAMLPACKAGES) \
-	    $(OBJECTS) $(libmllib_a_OBJECTS) -o mllib
+	    $(OBJECTS) $(libmltools_a_OBJECTS) -o mltools
 
 # Tests.
 
@@ -198,10 +198,10 @@ OCAMLLINKFLAGS = \
 
 common_utils_tests_DEPENDENCIES = \
 	$(common_utils_tests_THEOBJECTS) \
-	../common/mlstdutils/mlstdutils.$(MLARCHIVE) \
-	../common/mlgettext/mlgettext.$(MLARCHIVE) \
-	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	$(MLLIB_CMA) \
+	../mlstdutils/mlstdutils.$(MLARCHIVE) \
+	../mlgettext/mlgettext.$(MLARCHIVE) \
+	../mlpcre/mlpcre.$(MLARCHIVE) \
+	$(MLTOOLS_CMA) \
 	$(top_srcdir)/ocaml-link.sh
 common_utils_tests_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '-lutils $(LIBXML2_LIBS) -lgnu' -- \
@@ -211,10 +211,10 @@ common_utils_tests_LINK = \
 
 getopt_tests_DEPENDENCIES = \
 	$(getopt_tests_THEOBJECTS) \
-	../common/mlstdutils/mlstdutils.$(MLARCHIVE) \
-	../common/mlgettext/mlgettext.$(MLARCHIVE) \
-	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	$(MLLIB_CMA) \
+	../mlstdutils/mlstdutils.$(MLARCHIVE) \
+	../mlgettext/mlgettext.$(MLARCHIVE) \
+	../mlpcre/mlpcre.$(MLARCHIVE) \
+	$(MLTOOLS_CMA) \
 	$(top_srcdir)/ocaml-link.sh
 getopt_tests_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '-lutils $(LIBXML2_LIBS) -lgnu' -- \
@@ -224,10 +224,10 @@ getopt_tests_LINK = \
 
 JSON_tests_DEPENDENCIES = \
 	$(JSON_tests_THEOBJECTS) \
-	../common/mlstdutils/mlstdutils.$(MLARCHIVE) \
-	../common/mlgettext/mlgettext.$(MLARCHIVE) \
-	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	$(MLLIB_CMA) \
+	../mlstdutils/mlstdutils.$(MLARCHIVE) \
+	../mlgettext/mlgettext.$(MLARCHIVE) \
+	../mlpcre/mlpcre.$(MLARCHIVE) \
+	$(MLTOOLS_CMA) \
 	$(top_srcdir)/ocaml-link.sh
 JSON_tests_LINK = \
 	$(top_srcdir)/ocaml-link.sh -- \
diff --git a/mllib/URI.ml b/common/mltools/URI.ml
similarity index 100%
rename from mllib/URI.ml
rename to common/mltools/URI.ml
diff --git a/mllib/URI.mli b/common/mltools/URI.mli
similarity index 100%
rename from mllib/URI.mli
rename to common/mltools/URI.mli
diff --git a/mllib/checksums.ml b/common/mltools/checksums.ml
similarity index 100%
rename from mllib/checksums.ml
rename to common/mltools/checksums.ml
diff --git a/mllib/checksums.mli b/common/mltools/checksums.mli
similarity index 100%
rename from mllib/checksums.mli
rename to common/mltools/checksums.mli
diff --git a/mllib/common_utils-c.c b/common/mltools/common_utils-c.c
similarity index 100%
rename from mllib/common_utils-c.c
rename to common/mltools/common_utils-c.c
diff --git a/mllib/common_utils.ml b/common/mltools/common_utils.ml
similarity index 100%
rename from mllib/common_utils.ml
rename to common/mltools/common_utils.ml
diff --git a/mllib/common_utils.mli b/common/mltools/common_utils.mli
similarity index 100%
rename from mllib/common_utils.mli
rename to common/mltools/common_utils.mli
diff --git a/mllib/common_utils_tests.ml b/common/mltools/common_utils_tests.ml
similarity index 100%
rename from mllib/common_utils_tests.ml
rename to common/mltools/common_utils_tests.ml
diff --git a/mllib/curl.ml b/common/mltools/curl.ml
similarity index 100%
rename from mllib/curl.ml
rename to common/mltools/curl.ml
diff --git a/mllib/curl.mli b/common/mltools/curl.mli
similarity index 100%
rename from mllib/curl.mli
rename to common/mltools/curl.mli
diff --git a/mllib/dummy.c b/common/mltools/dummy.c
similarity index 100%
rename from mllib/dummy.c
rename to common/mltools/dummy.c
diff --git a/mllib/getopt-c.c b/common/mltools/getopt-c.c
similarity index 100%
rename from mllib/getopt-c.c
rename to common/mltools/getopt-c.c
diff --git a/mllib/getopt.ml b/common/mltools/getopt.ml
similarity index 100%
rename from mllib/getopt.ml
rename to common/mltools/getopt.ml
diff --git a/mllib/getopt.mli b/common/mltools/getopt.mli
similarity index 100%
rename from mllib/getopt.mli
rename to common/mltools/getopt.mli
diff --git a/mllib/getopt_tests.ml b/common/mltools/getopt_tests.ml
similarity index 100%
rename from mllib/getopt_tests.ml
rename to common/mltools/getopt_tests.ml
diff --git a/mllib/planner.ml b/common/mltools/planner.ml
similarity index 100%
rename from mllib/planner.ml
rename to common/mltools/planner.ml
diff --git a/mllib/planner.mli b/common/mltools/planner.mli
similarity index 100%
rename from mllib/planner.mli
rename to common/mltools/planner.mli
diff --git a/mllib/regedit.ml b/common/mltools/regedit.ml
similarity index 100%
rename from mllib/regedit.ml
rename to common/mltools/regedit.ml
diff --git a/mllib/regedit.mli b/common/mltools/regedit.mli
similarity index 100%
rename from mllib/regedit.mli
rename to common/mltools/regedit.mli
diff --git a/mllib/registry.ml b/common/mltools/registry.ml
similarity index 100%
rename from mllib/registry.ml
rename to common/mltools/registry.ml
diff --git a/mllib/registry.mli b/common/mltools/registry.mli
similarity index 100%
rename from mllib/registry.mli
rename to common/mltools/registry.mli
diff --git a/mllib/test-getopt.sh b/common/mltools/test-getopt.sh
similarity index 100%
rename from mllib/test-getopt.sh
rename to common/mltools/test-getopt.sh
diff --git a/mllib/uri-c.c b/common/mltools/uri-c.c
similarity index 100%
rename from mllib/uri-c.c
rename to common/mltools/uri-c.c
diff --git a/mllib/xpath_helpers.ml b/common/mltools/xpath_helpers.ml
similarity index 100%
rename from mllib/xpath_helpers.ml
rename to common/mltools/xpath_helpers.ml
diff --git a/mllib/xpath_helpers.mli b/common/mltools/xpath_helpers.mli
similarity index 100%
rename from mllib/xpath_helpers.mli
rename to common/mltools/xpath_helpers.mli
diff --git a/common/options/display-options.c b/common/options/display-options.c
index c411f4f3d..450b021d2 100644
--- a/common/options/display-options.c
+++ b/common/options/display-options.c
@@ -19,7 +19,7 @@
 /**
  * This file contains common code used to implement I<--short-options>
  * and I<--long-options> in C virt tools.  (The equivalent for
- * OCaml virt tools is implemented by F<mllib/getopt.ml>).
+ * OCaml virt tools is implemented by F<common/mltools/getopt.ml>).
  *
  * These "hidden" options are used to implement bash tab completion.
  */
diff --git a/configure.ac b/configure.ac
index f1deadde9..b4c639457 100644
--- a/configure.ac
+++ b/configure.ac
@@ -232,6 +232,7 @@ AC_CONFIG_FILES([Makefile
                  common/mlprogress/Makefile
                  common/mlstdutils/Makefile
                  common/mlstdutils/guestfs_config.ml
+                 common/mltools/Makefile
                  common/mlutils/Makefile
                  common/mlvisit/Makefile
                  common/mlxml/Makefile
@@ -275,7 +276,6 @@ AC_CONFIG_FILES([Makefile
                  lua/Makefile
                  lua/examples/Makefile
                  make-fs/Makefile
-                 mllib/Makefile
                  ocaml/META
                  ocaml/Makefile
                  ocaml/examples/Makefile
diff --git a/customize/Makefile.am b/customize/Makefile.am
index b3edc2e9b..2d358e293 100644
--- a/customize/Makefile.am
+++ b/customize/Makefile.am
@@ -128,7 +128,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlutils \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
-	-I $(top_builddir)/mllib \
+	-I $(top_builddir)/common/mltools \
 	-I $(builddir)
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
@@ -160,7 +160,7 @@ OCAMLLINKFLAGS = \
 	mlgettext.$(MLARCHIVE) \
 	mlpcre.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	customize.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
@@ -182,7 +182,7 @@ virt_customize_DEPENDENCIES = \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE)
+	../common/mltools/mltools.$(MLARCHIVE)
 virt_customize_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
 	  $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \
diff --git a/dib/Makefile.am b/dib/Makefile.am
index 37fa3224b..316f49903 100644
--- a/dib/Makefile.am
+++ b/dib/Makefile.am
@@ -87,7 +87,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlutils \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
-	-I $(top_builddir)/mllib
+	-I $(top_builddir)/common/mltools
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
@@ -113,7 +113,7 @@ OCAMLLINKFLAGS = \
 	mlcutils.$(MLARCHIVE) \
 	mlgettext.$(MLARCHIVE) \
 	mlpcre.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
 virt_dib_DEPENDENCIES = \
@@ -122,7 +122,7 @@ virt_dib_DEPENDENCIES = \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_dib_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
diff --git a/dib/output_format.mli b/dib/output_format.mli
index 76683adbc..469080ccc 100644
--- a/dib/output_format.mli
+++ b/dib/output_format.mli
@@ -73,7 +73,7 @@ type format = {
 
 and extra_arg = {
   extra_argspec : Getopt.keys * Getopt.spec * Getopt.doc;
-  (** The argspec.  See [Getopt] module in [mllib]. *)
+  (** The argspec.  See [Getopt] module in [common/mltools]. *)
 }
 
 val defaults : format
diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES
index 9ef9b0257..6130e459f 100644
--- a/docs/C_SOURCE_FILES
+++ b/docs/C_SOURCE_FILES
@@ -21,6 +21,10 @@ common/mlpcre/dummy.c
 common/mlpcre/pcre-c.c
 common/mlprogress/progress-c.c
 common/mlstdutils/dummy.c
+common/mltools/common_utils-c.c
+common/mltools/dummy.c
+common/mltools/getopt-c.c
+common/mltools/uri-c.c
 common/mlutils/c_utils-c.c
 common/mlutils/dummy.c
 common/mlutils/unix_utils-c.c
@@ -345,10 +349,6 @@ lib/whole-file.c
 lib/yara.c
 lua/lua-guestfs.c
 make-fs/make-fs.c
-mllib/common_utils-c.c
-mllib/dummy.c
-mllib/getopt-c.c
-mllib/uri-c.c
 ocaml/guestfs-c-actions.c
 ocaml/guestfs-c-errnos.c
 ocaml/guestfs-c.c
diff --git a/docs/guestfs-hacking.pod b/docs/guestfs-hacking.pod
index 56982d2c8..9998e6d2b 100644
--- a/docs/guestfs-hacking.pod
+++ b/docs/guestfs-hacking.pod
@@ -124,6 +124,11 @@ OCaml bindings for the progress bar functions (see F<common/progress>).
 
 A library of pure OCaml utility functions used in many places.
 
+=item F<common/mltools>
+
+OCaml utility functions only used by the OCaml virt tools (like
+C<virt-sysprep>, C<virt-v2v> etc.)
+
 =item F<common/mlutils>
 
 OCaml bindings for C functions in C<common/utils>, and some POSIX
@@ -262,11 +267,6 @@ M4 macros used by autoconf.  See L</THE BUILD SYSTEM>.
 
 L<virt-make-fs(1)> command and documentation.
 
-=item F<mllib>
-
-Various libraries and common code used by L<virt-resize(1)> and
-the other tools which are written in OCaml.
-
 =item F<p2v>
 
 L<virt-p2v(1)> command, documentation and scripts for building the
diff --git a/get-kernel/Makefile.am b/get-kernel/Makefile.am
index dad96bbe2..03d4b9815 100644
--- a/get-kernel/Makefile.am
+++ b/get-kernel/Makefile.am
@@ -70,7 +70,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlutils \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
-	-I $(top_builddir)/mllib
+	-I $(top_builddir)/common/mltools
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
@@ -96,7 +96,7 @@ OCAMLLINKFLAGS = \
 	mlgettext.$(MLARCHIVE) \
 	mlpcre.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
 virt_get_kernel_DEPENDENCIES = \
@@ -105,7 +105,7 @@ virt_get_kernel_DEPENDENCIES = \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_get_kernel_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in
index 1bea4da72..6517b52e6 100755
--- a/ocaml-dep.sh.in
+++ b/ocaml-dep.sh.in
@@ -38,11 +38,11 @@ common/mlgettext
 common/mlpcre
 common/mlprogress
 common/mlstdutils
+common/mltools
 common/mlutils
 common/mlvisit
 common/mlxml
 customize
-mllib
 ocaml
 "
 
diff --git a/resize/Makefile.am b/resize/Makefile.am
index 2dd33c797..9f0cd46ac 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -67,7 +67,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlutils \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
-	-I $(top_builddir)/mllib
+	-I $(top_builddir)/common/mltools
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
@@ -95,7 +95,7 @@ OCAMLLINKFLAGS = \
 	mlgettext.$(MLARCHIVE) \
 	mlpcre.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
 virt_resize_DEPENDENCIES = \
@@ -104,7 +104,7 @@ virt_resize_DEPENDENCIES = \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_resize_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am
index d8efc4bc2..ca3fd3bd6 100644
--- a/sparsify/Makefile.am
+++ b/sparsify/Makefile.am
@@ -75,7 +75,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlutils \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
-	-I $(top_builddir)/mllib
+	-I $(top_builddir)/common/mltools
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
 endif
@@ -103,7 +103,7 @@ OCAMLLINKFLAGS = \
 	mlgettext.$(MLARCHIVE) \
 	mlpcre.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
 virt_sparsify_DEPENDENCIES = \
@@ -112,7 +112,7 @@ virt_sparsify_DEPENDENCIES = \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_sparsify_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
index 778c36c8b..f201affae 100644
--- a/sysprep/Makefile.am
+++ b/sysprep/Makefile.am
@@ -120,7 +120,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
 	-I $(top_builddir)/common/mlvisit \
-	-I $(top_builddir)/mllib \
+	-I $(top_builddir)/common/mltools \
 	-I $(top_builddir)/customize
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
@@ -150,7 +150,7 @@ OCAMLLINKFLAGS = \
 	mlgettext.$(MLARCHIVE) \
 	mlpcre.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	mlvisit.$(MLARCHIVE) \
 	customize.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
@@ -161,7 +161,7 @@ virt_sysprep_DEPENDENCIES = \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	../customize/customize.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_sysprep_LINK = \
diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli
index 7291dd67f..3d9f12550 100644
--- a/sysprep/sysprep_operation.mli
+++ b/sysprep/sysprep_operation.mli
@@ -107,7 +107,7 @@ type operation = {
 
 and extra_arg = {
   extra_argspec : Getopt.keys * Getopt.spec * Getopt.doc;
-  (** The argspec.  See [Getopt] module in [mllib]. *)
+  (** The argspec.  See [Getopt] module in [common/mltools]. *)
 
   extra_pod_argval : string option;
   (** The argument value, used only in the virt-sysprep man page. *)
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index b7148e2c2..e1e6f9c80 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -154,7 +154,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/common/mlgettext \
 	-I $(top_builddir)/common/mlpcre \
 	-I $(top_builddir)/common/mlxml \
-	-I $(top_builddir)/mllib \
+	-I $(top_builddir)/common/mltools \
 	-I $(top_builddir)/customize
 if HAVE_OCAML_PKG_GETTEXT
 OCAMLPACKAGES += -package gettext-stub
@@ -183,7 +183,7 @@ OCAMLLINKFLAGS = \
 	mlpcre.$(MLARCHIVE) \
 	mlxml.$(MLARCHIVE) \
 	mlcutils.$(MLARCHIVE) \
-	mllib.$(MLARCHIVE) \
+	mltools.$(MLARCHIVE) \
 	$(LINK_CUSTOM_OCAMLC_ONLY)
 
 virt_v2v_DEPENDENCIES = $(OBJECTS) $(top_srcdir)/ocaml-link.sh
@@ -225,7 +225,7 @@ virt_v2v_copy_to_local_DEPENDENCIES = \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 virt_v2v_copy_to_local_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
@@ -517,7 +517,7 @@ v2v_unit_tests_DEPENDENCIES = \
 	../common/mlgettext/mlgettext.$(MLARCHIVE) \
 	../common/mlpcre/mlpcre.$(MLARCHIVE) \
 	../common/mlutils/mlcutils.$(MLARCHIVE) \
-	../mllib/mllib.$(MLARCHIVE) \
+	../common/mltools/mltools.$(MLARCHIVE) \
 	$(top_srcdir)/ocaml-link.sh
 v2v_unit_tests_LINK = \
 	$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
diff --git a/v2v/test-harness/Makefile.am b/v2v/test-harness/Makefile.am
index 8691c57c3..0bc5d2a38 100644
--- a/v2v/test-harness/Makefile.am
+++ b/v2v/test-harness/Makefile.am
@@ -44,7 +44,7 @@ OCAMLPACKAGES = \
 	-I $(top_builddir)/ocaml \
 	-I $(top_builddir)/common/mlstdutils \
 	-I $(top_builddir)/common/mlxml \
-	-I $(top_builddir)/mllib \
+	-I $(top_builddir)/common/mltools \
 	-I $(top_builddir)/v2v
 
 OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
-- 
2.13.2




More information about the Libguestfs mailing list