No change, just refactoring.
---
builder/Makefile.am | 6 ++----
customize/Makefile.am | 6 ++----
dib/Makefile.am | 6 ++----
get-kernel/Makefile.am | 6 ++----
mllib/Makefile.am | 8 ++------
resize/Makefile.am | 6 ++----
sparsify/Makefile.am | 6 ++----
subdir-rules.mk | 3 +++
sysprep/Makefile.am | 6 ++----
v2v/Makefile.am | 6 ++----
10 files changed, 21 insertions(+), 38 deletions(-)
diff --git a/builder/Makefile.am b/builder/Makefile.am
index b2d5ad3..2581c5a 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -159,14 +159,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma customize.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa customize.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) customize.$(MLARCHIVE)
$(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_builder_DEPENDENCIES = \
$(OBJECTS) \
../mllib/mllib.$(MLARCHIVE) \
diff --git a/customize/Makefile.am b/customize/Makefile.am
index dd35cdc..d992b54 100644
--- a/customize/Makefile.am
+++ b/customize/Makefile.am
@@ -143,14 +143,12 @@ CUSTOMIZE_XOBJECTS = $(BOBJECTS:.cmo=.cmx)
if !HAVE_OCAMLOPT
CUSTOMIZE_THEOBJECTS = $(CUSTOMIZE_BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma customize.cma -custom
else
CUSTOMIZE_THEOBJECTS = $(CUSTOMIZE_XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa customize.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) customize.$(MLARCHIVE)
$(LINK_CUSTOM_OCAMLC_ONLY)
+
OCAMLCLIBS = \
-lutils \
$(LIBTINFO_LIBS) \
diff --git a/dib/Makefile.am b/dib/Makefile.am
index a57d89d..9b986cc 100644
--- a/dib/Makefile.am
+++ b/dib/Makefile.am
@@ -81,14 +81,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) $(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_dib_DEPENDENCIES = \
$(OBJECTS) \
../mllib/mllib.$(MLARCHIVE) \
diff --git a/get-kernel/Makefile.am b/get-kernel/Makefile.am
index e145972..7cefdd6 100644
--- a/get-kernel/Makefile.am
+++ b/get-kernel/Makefile.am
@@ -78,14 +78,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) $(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_get_kernel_DEPENDENCIES = \
$(OBJECTS) \
../mllib/mllib.$(MLARCHIVE) \
diff --git a/mllib/Makefile.am b/mllib/Makefile.am
index 8a02c1f..0433b4c 100644
--- a/mllib/Makefile.am
+++ b/mllib/Makefile.am
@@ -185,9 +185,6 @@ getopt_tests.cmo: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS)
JSON_tests_THEOBJECTS = $(JSON_tests_BOBJECTS)
JSON_tests.cmo: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS)
-
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma -custom
else
common_utils_tests_THEOBJECTS = $(common_utils_tests_XOBJECTS)
common_utils_tests.cmx: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS)
@@ -197,11 +194,10 @@ getopt_tests.cmx: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS)
JSON_tests_THEOBJECTS = $(JSON_tests_XOBJECTS)
JSON_tests.cmx: OCAMLPACKAGES += $(OCAMLPACKAGES_TESTS)
-
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) $(LINK_CUSTOM_OCAMLC_ONLY)
+
common_utils_tests_DEPENDENCIES = \
$(common_utils_tests_THEOBJECTS) \
$(MLLIB_CMA) \
diff --git a/resize/Makefile.am b/resize/Makefile.am
index 96604b6..cf2f9cf 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -75,14 +75,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) $(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_resize_DEPENDENCIES = \
$(OBJECTS) \
../mllib/mllib.$(MLARCHIVE) \
diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am
index 847825a..5293fbf 100644
--- a/sparsify/Makefile.am
+++ b/sparsify/Makefile.am
@@ -79,14 +79,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) $(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_sparsify_DEPENDENCIES = \
$(OBJECTS) \
../mllib/mllib.$(MLARCHIVE) \
diff --git a/subdir-rules.mk b/subdir-rules.mk
index 525d210..39c2f50 100644
--- a/subdir-rules.mk
+++ b/subdir-rules.mk
@@ -49,8 +49,11 @@ LOG_DRIVER = env $(SHELL) $(top_srcdir)/build-aux/guestfs-test-driver
if !HAVE_OCAMLOPT
MLARCHIVE = cma
+LINK_CUSTOM_OCAMLC_ONLY = -custom
+BEST = c
else
MLARCHIVE = cmxa
+BEST = opt
endif
.mli.cmi:
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
index 1504df2..66e2ceb 100644
--- a/sysprep/Makefile.am
+++ b/sysprep/Makefile.am
@@ -127,14 +127,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma customize.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa customize.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) customize.$(MLARCHIVE)
$(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_sysprep_DEPENDENCIES = \
$(OBJECTS) \
../mllib/mllib.$(MLARCHIVE) \
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 988cba5..6529f13 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -146,14 +146,12 @@ OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR)
if !HAVE_OCAMLOPT
OBJECTS = $(BOBJECTS)
-BEST = c
-OCAMLLINKFLAGS = mlguestfs.cma mllib.cma -custom
else
OBJECTS = $(XOBJECTS)
-BEST = opt
-OCAMLLINKFLAGS = mlguestfs.cmxa mllib.cmxa
endif
+OCAMLLINKFLAGS = mlguestfs.$(MLARCHIVE) mllib.$(MLARCHIVE) $(LINK_CUSTOM_OCAMLC_ONLY)
+
virt_v2v_DEPENDENCIES = $(OBJECTS) $(top_srcdir)/ocaml-link.sh
virt_v2v_LINK = \
$(top_srcdir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \
--
2.7.4