From 251c6e994de97d9e87a0ace01144c12366e12c2b Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Fri, 20 Jan 2012 08:44:44 +0100 Subject: Fixed out-of-tree compilation of OCaml code after .depend files removal --- ocaml/Makefile.am | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ocaml/Makefile.am') diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 35cba466..fbeefc94 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -139,12 +139,13 @@ t/%.cmx: t/%.ml mlguestfs.cmxa depend: .depend -.depend: $(wildcard *.mli) $(wildcard *.ml) +.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml) rm -f $@ $@-t - $(OCAMLFIND) ocamldep $^ | \ - $(SED) -e 's/ *$$//' | \ + $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \ + $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ - LANG=C sort > $@-t + $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \ + sort > $@-t mv $@-t $@ -include .depend -- cgit