X-Git-Url: http://git.annexia.org/?p=virt-top.git;a=blobdiff_plain;f=Make.rules.in;h=12037e14eefbc976cbfa8a9d77c1b2873f6ff61c;hp=a25d4857b60a12ae6c401c9a41a40612d9737581;hb=b7c3ef13cbd9c9cd49005a32ffb70faf6f5bbe8c;hpb=81294675f6a5058a3381871f1dc99c806922d77c diff --git a/Make.rules.in b/Make.rules.in index a25d485..12037e1 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -1,5 +1,5 @@ # ocaml-libvirt -# Copyright (C) 2007 Red Hat Inc., Richard W.M. Jones +# Copyright (C) 2007-2009 Red Hat Inc., Richard W.M. Jones # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -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)