[PATCH] Do not distribute generated headers
Thierry Reding
thierry.reding at gmail.com
Wed May 7 05:09:35 PDT 2014
From: Thierry Reding <treding at nvidia.com>
The wayland-server-protocol.h and wayland-client-protocol.h headers are
currently being shipped in tarballs created using make dist. This causes
out-of-tree builds to fail since make will detect that the headers exist
by looking at the source directory (via VPATH) and not regenerate them.
But as opposed to ${top_builddir}/protocol, ${top_srcdir}/protocol is
not part of the include path and therefore the shipped files can't be
found during compilation.
Two solutions exist to this problem: 1) add ${top_srcdir}/protocol to
the include path to allow shipped files to be used if available or 2)
don't ship these generated files in release tarballs. The latter seems
the most appropriate. wayland-scanner is already a prerequisite in order
to generate wayland-protocol.c, so it is either built as part of the
package or provided externally. Generating all files from the protocol
definition at build time also ensures that they don't get out of sync.
Both of the generated headers are already listed in Makefile.am as
nodist_*_SOURCES, but at the same time they appear in include_HEADERS,
which will cause them to be added to the list of distributable files
after all. To prevent that, split them off into nodist_include_HEADERS.
Note that this problem will be hidden if a previous version of wayland
has been installed, since these files will exist in /usr/include and be
included from there. So this build error will only show for out-of-tree
builds on systems that don't have wayland installed yet.
Signed-off-by: Thierry Reding <treding at nvidia.com>
---
Makefile.am | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f1584d5bfc12..0ec6f47ab2c7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,13 +20,15 @@ noinst_LTLIBRARIES = libwayland-util.la
include_HEADERS = \
src/wayland-util.h \
- protocol/wayland-server-protocol.h \
src/wayland-server.h \
- protocol/wayland-client-protocol.h \
src/wayland-client.h \
src/wayland-egl.h \
src/wayland-version.h
+nodist_include_HEADERS = \
+ protocol/wayland-server-protocol.h \
+ protocol/wayland-client-protocol.h
+
libwayland_util_la_SOURCES = \
src/connection.c \
src/wayland-util.c \
--
1.9.2
More information about the wayland-devel
mailing list