ocaml: Enable parallel builds.

Commit f75142c577 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 dce94f3e26.
This commit is contained in:
Richard W.M. Jones
2014-03-23 16:31:10 +00:00
parent da122e382f
commit 26599da373

View File

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