On Fri, Jan 20, 2012 at 08:44:44AM +0100, Hilko Bengen wrote:
---
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 $@
If it doesn't break the ordinary build, then ACK.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming blog:
http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora