Pino Toscano
2018-May-22 15:28 UTC
[Libguestfs] [PATCH] v2v: fix build rules for output_rhv_upload_*_source.ml files
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
Richard W.M. Jones
2018-May-22 17:41 UTC
Re: [Libguestfs] [PATCH] v2v: fix build rules for output_rhv_upload_*_source.ml files
On Tue, May 22, 2018 at 05:28:36PM +0200, Pino Toscano wrote:> 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 >ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Maybe Matching Threads
- Re: [PATCH 2/2] v2v: -o rhv-upload: use same tmpdir for Python scripts
- Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
- [PATCH 7/8] v2v: -o rhv-upload: remove uploaded disks on failure
- Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
- [PATCH 1/8] v2v: -o rhv-upload: split vmcheck out of precheck