X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Make.rules.in;h=12037e14eefbc976cbfa8a9d77c1b2873f6ff61c;hb=8cd690d0b8a5343d8731145b95931ec7aaa2db35;hp=35af848adcc0bcb4141cd28d41f3118c47d7aad6;hpb=2a8acd07005f2e8cdc43a6cc2a4e6f3d66f9fc4d;p=virt-top.git 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)