From: Richard W.M. Jones <rjones@redhat.com>
Date: Fri, 12 Oct 2012 10:38:12 +0000 (+0100)
Subject: OCaml stable dependencies.
X-Git-Tag: 1.0.8~3
X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=83fbaeb129d5f1dc34b37f68ee22a4cbab013908;p=virt-top.git

OCaml stable dependencies.
---

diff --git a/Make.rules.in b/Make.rules.in
index 35af848..12037e1 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -51,12 +51,22 @@ depend: .depend
 
 ifneq ($(OCAMLFIND),)
 .depend: $(wildcard *.mli) $(wildcard *.ml)
-	rm -f .depend
-	$(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $(OCAMLDEPFLAGS) $^ > $@
+	rm -f $@ $@-t
+	$(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $(OCAMLDEPFLAGS) $^ | \
+	  sed 's/ :/:/' | \
+	  sed 's/ *$$//' | \
+	  sed -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+          sort > $@-t
+	mv $@-t $@
 else
 .depend: $(wildcard *.mli) $(wildcard *.ml)
-	rm -f .depend
-	$(OCAMLDEP) $(OCAMLCINCS) $(OCAMLDEPFLAGS) $^ > $@
+	rm -f $@ $@-t
+	$(OCAMLDEP) $(OCAMLCINCS) $(OCAMLDEPFLAGS) $^ | \
+	  sed 's/ :/:/' | \
+	  sed 's/ *$$//' | \
+	  sed -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+          sort > $@-t
+	mv $@-t $@
 endif
 
 ifeq ($(wildcard .depend),.depend)
diff --git a/virt-top/.depend b/virt-top/.depend
index 0f09d4f..46099b7 100644
--- a/virt-top/.depend
+++ b/virt-top/.depend
@@ -1,22 +1,20 @@
-virt_top_utils.cmi:
+virt_top_calendar1.cmo: virt_top_gettext.cmo virt_top.cmi
+virt_top_calendar1.cmx: virt_top_gettext.cmx virt_top.cmx
+virt_top_calendar2.cmo: virt_top_gettext.cmo virt_top.cmi
+virt_top_calendar2.cmx: virt_top_gettext.cmx virt_top.cmx
 virt_top.cmi:
+virt_top.cmo: virt_top_version.cmo virt_top_utils.cmi virt_top_gettext.cmo virt_top.cmi
+virt_top.cmx: virt_top_version.cmx virt_top_utils.cmx virt_top_gettext.cmx virt_top.cmi
+virt_top_csv.cmo: virt_top_gettext.cmo virt_top.cmi
+virt_top_csv.cmx: virt_top_gettext.cmx virt_top.cmx
 virt_top_gettext.cmo:
 virt_top_gettext.cmx:
 virt_top_main.cmo: virt_top_gettext.cmo virt_top.cmi
 virt_top_main.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top_csv.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_csv.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top_calendar1.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_calendar1.cmx: virt_top_gettext.cmx virt_top.cmx
-virt_top_xml.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_xml.cmx: virt_top_gettext.cmx virt_top.cmx
+virt_top_utils.cmi:
 virt_top_utils.cmo: virt_top_gettext.cmo virt_top_utils.cmi
 virt_top_utils.cmx: virt_top_gettext.cmx virt_top_utils.cmi
-virt_top_calendar2.cmo: virt_top_gettext.cmo virt_top.cmi
-virt_top_calendar2.cmx: virt_top_gettext.cmx virt_top.cmx
 virt_top_version.cmo:
 virt_top_version.cmx:
-virt_top.cmo: virt_top_version.cmo virt_top_utils.cmi virt_top_gettext.cmo \
-    virt_top.cmi
-virt_top.cmx: virt_top_version.cmx virt_top_utils.cmx virt_top_gettext.cmx \
-    virt_top.cmi
+virt_top_xml.cmo: virt_top_gettext.cmo virt_top.cmi
+virt_top_xml.cmx: virt_top_gettext.cmx virt_top.cmx