*** BLURB HERE? *** Pino Toscano (6): build: stop shipping files generated by configure docs: fix out-of-source documentation build generator: do not generate mlv2v files when not needed perl: fix path to Build.PL rust: fix path to lib.rs rust: fix list of generator-built files daemon/Makefile.am | 8 ++++++-- docs/Makefile.am | 4 ++-- generator/main.ml | 11 +++++++---- perl/Makefile.am | 2 +- python/Makefile.am | 3 ++- rust/Makefile.am | 5 ++--- tests/daemon/Makefile.am | 1 - 7 files changed, 20 insertions(+), 14 deletions(-) -- 2.23.0
Pino Toscano
2019-Dec-12 17:05 UTC
[Libguestfs] [PATCH v2 1/6] build: stop shipping files generated by configure
They will be generated by configure. --- daemon/Makefile.am | 8 ++++++-- python/Makefile.am | 3 ++- rust/Makefile.am | 1 - tests/daemon/Makefile.am | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 7c71920c4..20440aaee 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -59,9 +59,13 @@ generator_built = \ structs.ml \ structs.mli +CONFIGURE_GENERATED_ML = \ + daemon_config.ml + EXTRA_DIST = \ $(generator_built) \ - $(SOURCES_MLI) $(SOURCES_ML) \ + $(SOURCES_MLI) \ + $(filter-out $(CONFIGURE_GENERATED_ML),$(SOURCES_ML)) \ daemon_utils_tests.ml \ guestfsd.pod @@ -297,7 +301,7 @@ SOURCES_MLI = \ utils.mli SOURCES_ML = \ - daemon_config.ml \ + $(CONFIGURE_GENERATED_ML) \ utils.ml \ structs.ml \ optgroups.ml \ diff --git a/python/Makefile.am b/python/Makefile.am index 673de3157..9aca202b5 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -38,8 +38,9 @@ EXTRA_DIST = \ setup.py.in \ run-bindtests \ run-python-tests \ + t/__init__.py \ t/README \ - t/*.py + t/test[0-9]*.py if HAVE_PYTHON diff --git a/rust/Makefile.am b/rust/Makefile.am index c96607621..979e98bd4 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -26,7 +26,6 @@ EXTRA_DIST = \ tests/*.rs \ src/*.rs \ src/bin/*.rs \ - Cargo.toml \ README.md \ run-bindtests \ run-tests diff --git a/tests/daemon/Makefile.am b/tests/daemon/Makefile.am index 053cad3e1..921e6d1df 100644 --- a/tests/daemon/Makefile.am +++ b/tests/daemon/Makefile.am @@ -30,7 +30,6 @@ TESTS = \ TESTS_ENVIRONMENT = $(top_builddir)/run --test EXTRA_DIST = \ - captive-daemon.pm \ $(TESTS) check-valgrind: -- 2.23.0
Pino Toscano
2019-Dec-12 17:05 UTC
[Libguestfs] [PATCH v2 2/6] docs: fix out-of-source documentation build
Invoke make-internal-documentation.pl by its path in the source directory. Also, depend on it to regenerate the documentation in case make-internal-documentation.pl changes. --- docs/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index e1f2df952..f16f16c5e 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -151,9 +151,9 @@ stamp-guestfs-hacking.pod: guestfs-hacking.pod internal-documentation.pod source_files := $(shell cat $(srcdir)/C_SOURCE_FILES) -internal-documentation.pod: $(source_files:%=$(top_srcdir)/%) +internal-documentation.pod: $(source_files:%=$(top_srcdir)/%) $(srcdir)/make-internal-documentation.pl rm -f $@ $@-t - ./make-internal-documentation.pl \ + $(srcdir)/make-internal-documentation.pl \ --srcdir $(top_srcdir) \ -o $@-t \ $(source_files) -- 2.23.0
Pino Toscano
2019-Dec-12 17:05 UTC
[Libguestfs] [PATCH v2 3/6] generator: do not generate mlv2v files when not needed
mlv2v is not shipped with libguestfs, so do not try to generate the files for it in case generator is invoked on a release tarball. --- generator/main.ml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/generator/main.ml b/generator/main.ml index 741954e8e..09b4c8922 100644 --- a/generator/main.ml +++ b/generator/main.ml @@ -347,10 +347,13 @@ Run it from the top source directory using the command output_to "gobject/src/session.c" GObject.generate_gobject_session_source; - output_to "common/mlv2v/uefi.ml" - UEFI.generate_uefi_ml; - output_to "common/mlv2v/uefi.mli" - UEFI.generate_uefi_mli; + (* mlv2v may not be shipped in this source. *) + if is_regular_file "common/mlv2v/Makefile.am" then ( + output_to "common/mlv2v/uefi.ml" + UEFI.generate_uefi_ml; + output_to "common/mlv2v/uefi.mli" + UEFI.generate_uefi_mli; + ); output_to "common/mlcustomize/customize_cmdline.mli" Customize.generate_customize_cmdline_mli; -- 2.23.0
It is a generated file, so it is in the build directory. --- perl/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl/Makefile.am b/perl/Makefile.am index 49bf6cc63..212bcb81e 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -59,7 +59,7 @@ clean-local: Build ./Build clean Build: Build.PL - $(PERL) $(srcdir)/Build.PL --prefix "@prefix@" + $(PERL) Build.PL --prefix "@prefix@" TESTS_ENVIRONMENT = $(top_builddir)/run --test -- 2.23.0
It is a source file, so explicitly look for it in the source directory. --- rust/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Makefile.am b/rust/Makefile.am index 979e98bd4..edcccffa1 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -32,7 +32,7 @@ EXTRA_DIST = \ if HAVE_RUST -all: src/lib.rs +all: $(srcdir)/src/lib.rs $(top_builddir)/run $(CARGO) build --release TESTS = run-bindtests run-tests -- 2.23.0
Pino Toscano
2019-Dec-12 17:05 UTC
[Libguestfs] [PATCH v2 6/6] rust: fix list of generator-built files
src/lib.rs is not created by the generator, while src/guestfs.rs is. --- rust/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/Makefile.am b/rust/Makefile.am index edcccffa1..cb16e021f 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -19,7 +19,7 @@ include $(top_srcdir)/subdir-rules.mk generator_built = \ src/bin/bindtests.rs \ - src/lib.rs + src/guestfs.rs EXTRA_DIST = \ $(generator_built) \ -- 2.23.0
Pino Toscano
2019-Dec-12 17:55 UTC
Re: [Libguestfs] [PATCH v2 1/6] build: stop shipping files generated by configure
On Thursday, 12 December 2019 18:05:00 CET Pino Toscano wrote:> They will be generated by configure. > ---Self-hold on this specific patch: without the fix discussed as Debian bug [1][2], this patch will break the build in a srcdir!=builddir setup. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946594 [2] https://www.redhat.com/archives/libguestfs/2019-December/msg00051.html -- Pino Toscano
Richard W.M. Jones
2019-Dec-13 14:42 UTC
Re: [Libguestfs] [PATCH v2 6/6] rust: fix list of generator-built files
On Thu, Dec 12, 2019 at 06:05:05PM +0100, Pino Toscano wrote:> src/lib.rs is not created by the generator, while src/guestfs.rs is. > --- > rust/Makefile.am | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rust/Makefile.am b/rust/Makefile.am > index edcccffa1..cb16e021f 100644 > --- a/rust/Makefile.am > +++ b/rust/Makefile.am > @@ -19,7 +19,7 @@ include $(top_srcdir)/subdir-rules.mk > > generator_built = \ > src/bin/bindtests.rs \ > - src/lib.rs > + src/guestfs.rs > > EXTRA_DIST = \ > $(generator_built) \ACK series. Up to you what you want to do about patch 1. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top