X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=Make.rules.in;h=12037e14eefbc976cbfa8a9d77c1b2873f6ff61c;hb=0b6f6d45d50174e27f9a425f67bb1a6045a8e58c;hp=6a567281b3c1ec1dd4b03a085042bd82d496fd57;hpb=b858ee135c0814f1781cc16802a7b538d5f047a7;p=virt-top.git diff --git a/Make.rules.in b/Make.rules.in index 6a56728..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 @@ -40,18 +40,33 @@ else $(OCAMLOPT) $(OCAMLOPTFLAGS) $(OCAMLOPTINCS) -c $< endif +%.ml %.mli: %.mly + ocamlyacc $< +.mll.ml: + ocamllex $< + # Dependencies. depend: .depend ifneq ($(OCAMLFIND),) .depend: $(wildcard *.mli) $(wildcard *.ml) - rm -f .depend - $(OCAMLFIND) ocamldep $(OCAMLCPACKAGES) $^ > $@ + 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) $^ > $@ + 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) @@ -60,4 +75,4 @@ endif .PHONY: depend dist check-manifest dpkg doc -.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll +.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly