[PATCHv2] build: don't ship access syms files in tarball

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

 



On a mingw VPATH build (such as done by ./autobuild.sh), the tarball
created by 'make dist' was including generated files.  The VPATH
rules were then seeing that the tarball files were up-to-date, and
not regenerating files locally, leading to this failure:

  GEN      libvirt.syms
cat: libvirt_access.syms: No such file or directory
cat: libvirt_access_qemu.syms: No such file or directory
cat: libvirt_access_lxc.syms: No such file or directory
make: *** [libvirt.syms] Error 1

We already have a category for generated sym files, which are
intentionally not part of the tarball; stick the access sym
files in that category.

Rearrange the declarations a bit to make it harder to repeat the
problem in the future, and drop assignments that are now redundant
(GENERATED_SYM_FILES are already listed as BUILT_FILES, so we
don't have to repeat that for ACCESS_DRIVER_SYM_FILES).

* src/Makefile.am (USED_SYM_FILES): Don't include generated files.
(GENERATED_SYM_FILES): Access syms files are generated.
(libvirt.syms): Include access syms files here.
(ACCESS_DRIVER_SYMFILES): Rename...
(ACCESS_DRIVER_SYM_FILES): ...for consistency.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---

v1 discussion was here:
https://www.redhat.com/archives/libvir-list/2013-July/msg00054.html

Pushing under the build-breaker rule; now that I'm more confident
at why the build was failing, and also pushing to v1.1.0-maint.

 src/Makefile.am | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 285334b..15a2840 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -815,7 +815,7 @@ ACCESS_DRIVER_GENERATED = \
 		$(srcdir)/access/viraccessapichecklxc.h \
 		$(srcdir)/access/viraccessapichecklxc.c

-ACCESS_DRIVER_SYMFILES = \
+ACCESS_DRIVER_SYM_FILES = \
 		libvirt_access.syms \
 		libvirt_access_qemu.syms \
 		libvirt_access_lxc.syms
@@ -927,8 +927,14 @@ libvirt_driver_la_CFLAGS = \
 libvirt_driver_la_LIBADD = \
 		$(GNUTLS_LIBS) $(CURL_LIBS) $(DLOPEN_LIBS)

+# All .syms files should be placed in exactly one of these three lists,
+# depending on whether they are stored in git and/or used in the build.
 SYM_FILES = $(USED_SYM_FILES)
 USED_SYM_FILES = $(srcdir)/libvirt_private.syms
+GENERATED_SYM_FILES = \
+	$(ACCESS_DRIVER_SYM_FILES) \
+	libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def \
+	$(NULL)

 if WITH_TEST
 noinst_LTLIBRARIES += libvirt_driver_test.la
@@ -1474,9 +1480,8 @@ EXTRA_DIST += $(ACCESS_DRIVER_POLKIT_SOURCES)
 endif


-USED_SYM_FILES += $(ACCESS_DRIVER_SYMFILES)
-BUILT_SOURCES += $(ACCESS_DRIVER_GENERATED) $(ACCESS_DRIVER_SYMFILES)
-CLEANFILES += $(ACCESS_DRIVER_GENERATED) $(ACCESS_DRIVER_SYMFILES)
+BUILT_SOURCES += $(ACCESS_DRIVER_GENERATED)
+CLEANFILES += $(ACCESS_DRIVER_GENERATED)

 libvirt_access.syms: $(srcdir)/rpc/gendispatch.pl \
 			$(REMOTE_PROTOCOL) Makefile.am
@@ -1713,12 +1718,9 @@ EXTRA_DIST += \
 	$(SYM_FILES)			\
 	$(NULL)

-GENERATED_SYM_FILES = \
-	libvirt.syms libvirt.def libvirt_qemu.def libvirt_lxc.def
-
 BUILT_SOURCES += $(GENERATED_SYM_FILES)

-libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
+libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) \
 		$(top_builddir)/config.status
 	$(AM_V_GEN)rm -f $@-tmp $@ ; \
 	printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \
@@ -1726,7 +1728,7 @@ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
 	printf '\n\n# Private symbols\n\n' >>$@-tmp && \
 	printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n'  >>$@-tmp && \
 	printf 'global:\n\n' >>$@-tmp && \
-	cat $(USED_SYM_FILES) >>$@-tmp && \
+	cat $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) >>$@-tmp && \
 	printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
 	chmod a-w $@-tmp && \
 	mv $@-tmp libvirt.syms
-- 
1.8.1.4

--
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]