[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 3/3] build: fix make implicit dependencies on ml/mli files

As proposed in the Debian bug #946594 [1], the implicit .cmi/.cmo/.cmx
dependencies are tied to files in the source directory only, and thus
they break when either the .ml or the .mli files are in the build
directory. Since there is already VPATH set up by automake, rely on it
to locate the right source.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946594#36

Solution proposed by Vincent Danjean, thanks!

This reverts commit 802c5d2055593adf6bfae796b102b8c902de571e in this
 subdir-rules.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/subdir-rules.mk b/subdir-rules.mk
index 3a20cb10d..a789a82f6 100644
--- a/subdir-rules.mk
+++ b/subdir-rules.mk
@@ -79,12 +79,12 @@ guestfs_am_v_jar = $(guestfs_am_v_jar_ AM_V@)
 guestfs_am_v_jar_ = $(guestfs_am_v_jar_ AM_DEFAULT_V@)
 guestfs_am_v_jar_0 = @echo "  JAR     " $@;
-%.cmi: $(srcdir)/%.mli
+%.cmi: %.mli
 	$(guestfs_am_v_ocamlcmi)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
-%.cmo: $(srcdir)/%.ml
+%.cmo: %.ml
 	$(guestfs_am_v_ocamlc)$(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
-%.cmx: $(srcdir)/%.ml
+%.cmx: %.ml
 	$(guestfs_am_v_ocamlopt)$(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]