build: enable gcc warnings in capitests/ and ocaml/
[libguestfs.git] / ocaml / Makefile.am
index 1aa0cb6..462404c 100644 (file)
@@ -29,7 +29,8 @@ 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 +95,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