summaryrefslogtreecommitdiffstats
path: root/ocaml/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml/Makefile.am')
-rw-r--r--ocaml/Makefile.am9
1 files changed, 5 insertions, 4 deletions
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