[PATCH 1/2] ocaml: Only build the tests when running 'make check'.
Make the tests 'check_DATA' so they only get built when running the tests. This saves a couple of seconds on the build time. --- ocaml/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index e781363..a535b43 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -142,9 +142,9 @@ endif TESTS = run-bindtests $(test_progs_all) -noinst_DATA += bindtests.bc $(test_progs_all) +check_DATA = bindtests.bc $(test_progs_all) if HAVE_OCAMLOPT -noinst_DATA += bindtests.opt +check_DATA += bindtests.opt endif %.bc: %.cmo mlguestfs.cma @@ -204,6 +204,6 @@ install-data-hook: rm $(DESTDIR)$(OCAMLLIB)/guestfs/bindtests.* rm $(DESTDIR)$(OCAMLLIB)/guestfs/libguestfsocaml.a -CLEANFILES += $(noinst_DATA) +CLEANFILES += $(noinst_DATA) $(check_DATA) endif -- 2.5.0
Make the tests 'check_DATA' so they only get built when running the tests. --- java/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/Makefile.am b/java/Makefile.am index fa5b45c..b562192 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -134,7 +134,7 @@ endif ENABLE_APPLIANCE TESTS_ENVIRONMENT = $(top_builddir)/run --test -noinst_DATA = Bindtests.class $(java_tests:.java=.class) +check_DATA = Bindtests.class $(java_tests:.java=.class) t/%.class: t/%.java libguestfs-$(VERSION).jar $(JAVAC) $(JAVAC_FLAGS) -classpath libguestfs-$(VERSION).jar -d t $< -- 2.5.0
On Tuesday 29 September 2015 22:45:59 Richard W.M. Jones wrote:
Make the tests 'check_DATA' so they only get built when running the tests. This saves a couple of seconds on the build time. --- ocaml/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index e781363..a535b43 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -142,9 +142,9 @@ endif
TESTS = run-bindtests $(test_progs_all)
-noinst_DATA += bindtests.bc $(test_progs_all) +check_DATA = bindtests.bc $(test_progs_all) if HAVE_OCAMLOPT -noinst_DATA += bindtests.opt +check_DATA += bindtests.opt endif
%.bc: %.cmo mlguestfs.cma @@ -204,6 +204,6 @@ install-data-hook: rm $(DESTDIR)$(OCAMLLIB)/guestfs/bindtests.* rm $(DESTDIR)$(OCAMLLIB)/guestfs/libguestfsocaml.a
-CLEANFILES += $(noinst_DATA) +CLEANFILES += $(noinst_DATA) $(check_DATA)
endif
Both patches in this series LGTM. -- Pino Toscano
participants (2)
-
Pino Toscano -
Richard W.M. Jones