Skip to content
  • Thierry Reding's avatar
    Do not distribute generated headers · 6b278785
    Thierry Reding authored
    
    
    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>
    6b278785