OCaml stable dependencies.
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 12 Oct 2012 10:38:12 +0000 (11:38 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 12 Oct 2012 10:38:12 +0000 (11:38 +0100)
Make.rules.in
virt-top/.depend

index 35af848..12037e1 100644 (file)
@@ -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)
index 0f09d4f..46099b7 100644 (file)
@@ -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