build: avoid parallel ocaml/... build failure
[libguestfs.git] / ocaml / Makefile.am
index 1aa0cb6..c89296b 100644 (file)
@@ -23,13 +23,12 @@ EXTRA_DIST = \
        run-bindtests \
        t/*.ml
 
-SUBDIRS = examples
-
 CLEANFILES = *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so
 CLEANFILES += t/*.cmi t/*.cmo t/*.cmx t/*.o t/*.a t/*.so
 
 AM_CPPFLAGS = -I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \
-  -I$(top_srcdir)/src -I$(top_builddir)/src
+  -I$(top_srcdir)/src -I$(top_builddir)/src \
+  $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
 if HAVE_OCAML
 
@@ -94,8 +93,9 @@ t/%.cmx: t/%.ml mlguestfs.cmxa
 depend: .depend
 
 .depend: $(wildcard *.mli) $(wildcard *.ml)
-       rm -f .depend
-       $(OCAMLFIND) ocamldep $^ > $@
+       rm -f $@ $@-t
+       $(OCAMLFIND) ocamldep $^ | sed 's/  *$$//' > $@-t
+       mv $@-t $@
 
 include .depend