---
ocaml/Makefile.am | 9 +++++----
resize/Makefile.am | 5 +++--
sparsify/Makefile.am | 5 +++--
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 9cd77e8..c7eb2cc 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -137,12 +137,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
diff --git a/resize/Makefile.am b/resize/Makefile.am
index 31de9e7..0d64028 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -110,11 +110,12 @@ TESTS = test-virt-resize.sh utils_tests
# Dependencies.
depend: .depend
-.depend: $(wildcard *.mli) $(wildcard *.ml)
+.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml)
rm -f $@ $@-t
- $(OCAMLFIND) ocamldep -I ../ocaml $^ | \
+ $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \
$(SED) 's/ *$$//' | \
$(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+ $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \
sort > $@-t
mv $@-t $@
diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am
index aebaebc..76d9022 100644
--- a/sparsify/Makefile.am
+++ b/sparsify/Makefile.am
@@ -103,11 +103,12 @@ TESTS = test-virt-sparsify.sh
# Dependencies.
depend: .depend
-.depend: $(wildcard *.mli) $(wildcard *.ml)
+.depend: $(wildcard $(abs_srcdir)/*.mli) $(wildcard $(abs_srcdir)/*.ml)
rm -f $@ $@-t
- $(OCAMLFIND) ocamldep -I ../ocaml $^ | \
+ $(OCAMLFIND) ocamldep -I ../ocaml -I $(abs_srcdir) $^ | \
$(SED) 's/ *$$//' | \
$(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
+ $(SED) -e 's,$(abs_srcdir)/,$(builddir)/,g' | \
sort > $@-t
mv $@-t $@
--
1.7.8.3