build: don't emit trailing blanks, remove generated file
[libguestfs.git] / ocaml / Makefile.am
index 1aa0cb6..d65ebaa 100644 (file)
@@ -94,8 +94,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