Commit 6b278785 authored by Thierry Reding's avatar Thierry Reding Committed by Kristian Høgsberg
Browse files

Do not distribute generated headers



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: default avatarThierry Reding <treding@nvidia.com>
parent 3e007aef
......@@ -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 \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment