[libvirt-glib 1/2] tests: Move EXTRA_DIST back into ENABLE_TESTS conditional

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

 



When deciding which files to put into the make dist tarball, automake is
clever enough to ignore conditional blocks, and to pick all files which are
needed for all values of the conditional.

Having EXTRA_DIST=xxx at the beginning of tests/Makefile.am causes
warnings from automake when ENABLE_TESTS is true as glib-tap.mk will
unconditionally empty it.

Keeping EXTRA_DIST+=xxx outside of the ENABLE_TESTS conditional would
cause a different warning from automake when ENABLE_TESTS is false as
we'd be appending to a variable which was never set.

Moving EXTRA_DIST+= back into the conditional solves these 2 warnings.
---
 tests/Makefile.am | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8cb98e5..041415f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,9 +1,3 @@
-EXTRA_DIST = \
-	xml/gconfig-domain.xml \
-	xml/gconfig-domain-clock.xml \
-	xml/gconfig-domain-os.xml \
-	$(NULL)
-
 if ENABLE_TESTS
 
 include $(top_srcdir)/build-aux/glib-tap.mk
@@ -22,9 +16,9 @@ LDADD = \
 
 test_programs = test-gconfig test-events
 
-else
 EXTRA_DIST += \
-	test-events.c \
-	test-gconfig.c \
+	xml/gconfig-domain.xml \
+	xml/gconfig-domain-clock.xml \
+	xml/gconfig-domain-os.xml \
 	$(NULL)
 endif
-- 
1.8.5.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]