Skip to content

Commit

Permalink
wayland: Don't commit and ship generated files
Browse files Browse the repository at this point in the history
I believe shipping wayland-drm-client-protocol.h is wrong: The header
should always be generated by the wayland-scanner that matches the
runtime wayland version. Currently when someone clones the repo and
builds, the shipped version is used.

Remove wayland-drm-client-protocol.h from source tree, modify the
build so the header is considered a built source file, and make
configure fail if wayland is enabled but wayland-scanner is not found.

Fixes #34.

Signed-off-by: Jussi Kukkonen <[email protected]>
  • Loading branch information
Jussi Kukkonen authored and seanvk committed Feb 24, 2017
1 parent b832b37 commit e613327
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 291 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ if test "$enable_wayland" = "yes"; then
WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
[${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
if test "x$WAYLAND_SCANNER" = "x"; then
AC_MSG_ERROR([wayland-scanner not found: Install it or use --disable-wayland])
fi

AC_DEFINE([HAVE_VA_WAYLAND], [1],
[Defined to 1 if VA/Wayland API is built])
Expand Down
5 changes: 4 additions & 1 deletion va/wayland/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ protocol_source_h = \
noinst_LTLIBRARIES = libva_wayland.la
libva_waylandincludedir = ${includedir}/va
libva_waylandinclude_HEADERS = $(source_h)
libva_wayland_la_SOURCES = $(source_c) $(protocol_source_h)
libva_wayland_la_SOURCES = $(source_c)
noinst_HEADERS = $(source_h_priv)

# Wayland protocol
Expand All @@ -65,5 +65,8 @@ EXTRA_DIST = \
wayland-drm.xml \
$(NULL)

BUILT_SOURCES = $(protocol_source_h)
CLEANFILES = $(BUILT_SOURCES)

# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = Makefile.in
290 changes: 0 additions & 290 deletions va/wayland/wayland-drm-client-protocol.h

This file was deleted.

0 comments on commit e613327

Please sign in to comment.