From 26599da373c549034a1bc01923e5920f61f16abe Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 23 Mar 2014 16:31:10 +0000 Subject: [PATCH] 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 7c8e515c7..ee5a24185 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: