[Libguestfs] [PATCH] v2v: fix build rules for output_rhv_upload_*_source.ml files

Pino Toscano ptoscano at redhat.com
Tue May 22 15:28:36 UTC 2018


Use the $(srcdir) variable where needed, to make sure it builds also
with srcdir != builddir.

Furthermore, make sure that the OCaml dependencies calculation depend on
the generated output_rhv_upload_*_source.ml files, otherwise there will
be incomplete OCaml rules for them in the generated .depend.

Fixes commit cc04573927cca97de60d544d37467e67c25867a7.
---
 v2v/Makefile.am | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 34cad197b..88b31f86c 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -143,12 +143,12 @@ SOURCES_C = \
 
 # These files are generated and contain rhv-upload-*.py embedded as an
 # OCaml string.
-output_rhv_upload_createvm_source.ml: rhv-upload-createvm.py
-	./embed.sh code $^ $@
-output_rhv_upload_plugin_source.ml: rhv-upload-plugin.py
-	./embed.sh code $^ $@
-output_rhv_upload_precheck_source.ml: rhv-upload-precheck.py
-	./embed.sh code $^ $@
+output_rhv_upload_createvm_source.ml: $(srcdir)/rhv-upload-createvm.py
+	$(srcdir)/embed.sh code $^ $@
+output_rhv_upload_plugin_source.ml: $(srcdir)/rhv-upload-plugin.py
+	$(srcdir)/embed.sh code $^ $@
+output_rhv_upload_precheck_source.ml: $(srcdir)/rhv-upload-precheck.py
+	$(srcdir)/embed.sh code $^ $@
 
 if HAVE_OCAML
 
@@ -578,7 +578,7 @@ v2v_unit_tests_LINK = \
 	  $(v2v_unit_tests_THEOBJECTS) -o $@
 
 # Dependencies.
-.depend: $(srcdir)/*.mli $(srcdir)/*.ml
+.depend: $(srcdir)/*.mli $(srcdir)/*.ml output_rhv_upload_createvm_source.ml output_rhv_upload_plugin_source.ml output_rhv_upload_precheck_source.ml
 	$(top_builddir)/ocaml-dep.sh $^
 -include .depend
 
-- 
2.17.0




More information about the Libguestfs mailing list