[Pkg-libvirt-commits] [libguestfs] 07/61: ocaml: Enable parallel builds.

Hilko Bengen bengen at moszumanska.debian.org
Sat Mar 29 14:36:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 26599da373c549034a1bc01923e5920f61f16abe
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sun Mar 23 16:31:10 2014 +0000

    ocaml: Enable parallel builds.
    
    Commit f75142c577255b30f2a8e1d27baa5fd185594197 disabled parallel
    builds in the ocaml subdirectory (which was the correct thing to do).
    This made building the OCaml tests in particular very slow.  Therefore
    fix things so that parallel builds can be used again.
    
    See also discussion here about different approaches:
    
    https://www.redhat.com/archives/libguestfs/2014-March/thread.html#00223
    
    This reintroduces commit dce94f3e266ed3f1fc634a1ef6953f2db1510963.
---
 ocaml/Makefile.am | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 7c8e515..ee5a241 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -54,15 +54,25 @@ noinst_LIBRARIES = libguestfsocaml.a
 # 'libmlguestfs.a' and if run at the same time, they will stomp on or
 # corrupt each others copy.  Hence we have to serialize the calls.
 
-mlguestfs.cma: libguestfsocaml.a guestfs.cmo
+CLEANFILES += stamp-mlguestfs
+
+mlguestfs.cma mlguestfs.cmxa: stamp-mlguestfs
+
+guestfs_cmm = guestfs.cmo
+if HAVE_OCAMLOPT
+guestfs_cmm += guestfs.cmx
+endif
+
+stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm)
 	$(OCAMLMKLIB) -o mlguestfs \
 	  $(libguestfsocaml_a_OBJECTS) guestfs.cmo \
 	  -L$(top_builddir)/src/.libs -lguestfs
-
-mlguestfs.cmxa: libguestfsocaml.a guestfs.cmx
+if HAVE_OCAMLOPT
 	$(OCAMLMKLIB) -o mlguestfs \
 	  $(libguestfsocaml_a_OBJECTS) guestfs.cmx \
 	  -L$(top_builddir)/src/.libs -lguestfs
+endif
+	touch $@
 
 libguestfsocaml_a_CPPFLAGS = \
 	-DGUESTFS_PRIVATE=1 \
@@ -189,7 +199,3 @@ install-data-hook:
 CLEANFILES += $(noinst_DATA)
 
 endif
-
-# Tell version 3.79 and up of GNU make to not build goals in this
-# directory in parallel.
-.NOTPARALLEL:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list