Stable OCaml dependencies.
[libguestfs.git] / ocaml / Makefile.am
index 8daa671..28c13c5 100644 (file)
@@ -135,7 +135,10 @@ depend: .depend
 
 .depend: $(wildcard *.mli) $(wildcard *.ml)
        rm -f $@ $@-t
 
 .depend: $(wildcard *.mli) $(wildcard *.ml)
        rm -f $@ $@-t
-       $(OCAMLFIND) ocamldep $^ | sed 's/  *$$//' | sort > $@-t
+       $(OCAMLFIND) ocamldep $^ | \
+         $(SED) 's/ *$$//' | \
+         $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+         sort > $@-t
        mv $@-t $@
 
 include .depend
        mv $@-t $@
 
 include .depend