Stable OCaml dependencies.
authorRichard W.M. Jones <rich@annexia.org>
Fri, 10 Aug 2012 11:52:44 +0000 (11:52 +0000)
committerRichard W.M. Jones <rich@annexia.org>
Fri, 10 Aug 2012 11:52:44 +0000 (11:52 +0000)
Makefile.in
configure.ac

index 3f77648..cb71f5a 100644 (file)
@@ -26,6 +26,7 @@ OCAMLDOC      = @OCAMLDOC@
 INSTALL                = @INSTALL@
 TIME           = @TIME@
 GPROF          = @GPROF@
+SED            = @SED@
 BISECT_REPORT  = @BISECT_REPORT@
 
 BYTESWAP_H     = @BYTESWAP_H@
@@ -295,13 +296,20 @@ depend: .depend
          bitstring_persistent.ml bitstring_persistent.mli \
          bitstring_objinfo.ml \
          create_test_pattern.ml
-       rm -f .depend
+       rm -f $@ $@-t
        $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) \
          bitstring.ml bitstring.mli \
-         bitstring_objinfo.ml >> $@
+         bitstring_objinfo.ml | \
+         $(SED) 's/ :/:/' | \
+         $(SED) 's/ *$$//' | \
+         $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' >> $@-t
        $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) -pp camlp4of \
          bitstring_persistent.ml bitstring_persistent.mli \
-         create_test_pattern.ml >> $@
+         create_test_pattern.ml | \
+         $(SED) 's/ :/:/' | \
+         $(SED) 's/ *$$//' | \
+         $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' >> $@-t
+       mv $@-t $@
 
 ifeq ($(wildcard .depend),.depend)
 include .depend
index 455b3d1..b63c881 100644 (file)
@@ -19,6 +19,8 @@ dnl Process this file with autoconf to produce a configure script.
 
 AC_INIT(ocaml-bitstring,2.0.3)
 
+AC_PROG_SED
+
 dnl Check for basic C environment.
 AC_PROG_CC
 AC_PROG_INSTALL