ocaml: Make dependencies file stable.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 14 Dec 2010 15:46:53 +0000 (15:46 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 14 Dec 2010 15:47:20 +0000 (15:47 +0000)
Makefile.am
configure.ac

index cc16b78..cfab18c 100644 (file)
@@ -103,7 +103,9 @@ depend: .depend
 
 .depend: $(wildcard *.mli) $(wildcard *.ml)
        rm -f $@ $@-t
-       $(OCAMLFIND) ocamldep $^ > $@-t
+       $(OCAMLFIND) ocamldep $^ | \
+         $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+         sort > $@-t
        mv $@-t $@
 
 include .depend
index 1114c6a..477fc85 100644 (file)
@@ -28,6 +28,8 @@ test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
 AM_PROG_CC_C_O
 AC_SYS_LARGEFILE
 
+AC_PROG_SED
+
 dnl Check for OCaml compiler.
 AC_PROG_OCAML
 if test "$OCAMLOPT" = "no"; then