[Libva] [PATCH 2/2] Fix error caused by 'make distclean' with wayland disabled

Emil Velikov emil.l.velikov at gmail.com
Thu Dec 10 12:31:05 PST 2015


On 10 December 2015 at 19:58, Xiang, Haihao <haihao.xiang at intel.com> wrote:
> This is based on Mesa's 426a23af147720ae3b89995ffee792a29e8ae2db
>
> Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> ---
>  configure.ac                        |   7 +-
>  va/wayland/Makefile.am              |   9 ++-
>  va/wayland/protocol/Makefile.am     |   1 -
>  va/wayland/protocol/wayland-drm.xml | 155 ------------------------------------
>  va/wayland/wayland-drm.xml          | 155 ++++++++++++++++++++++++++++++++++++
>  5 files changed, 167 insertions(+), 160 deletions(-)
>  delete mode 100644 va/wayland/protocol/wayland-drm.xml
>  create mode 100644 va/wayland/wayland-drm.xml
>
> diff --git a/configure.ac b/configure.ac
> index b54eafe..6270d35 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -273,9 +273,10 @@ if test "$enable_wayland" = "yes"; then
>      PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version],
>          [USE_WAYLAND="yes"], [:])
>      if test "$USE_WAYLAND" = "yes"; then
> -        m4_ifdef([WAYLAND_SCANNER_RULES],
> -            [WAYLAND_SCANNER_RULES(['$(top_builddir)/va/wayland/protocol'])],
> -            [wayland_scanner_rules=""; AC_SUBST(wayland_scanner_rules)])
> +
> +        WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
> +        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
> +                     [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
>
>          AC_DEFINE([HAVE_VA_WAYLAND], [1],
>                    [Defined to 1 if VA/Wayland API is built])
> diff --git a/va/wayland/Makefile.am b/va/wayland/Makefile.am
> index ca6c594..7a724ae 100644
> --- a/va/wayland/Makefile.am
> +++ b/va/wayland/Makefile.am
> @@ -60,7 +60,14 @@ noinst_HEADERS                       = $(source_h_priv)
>
>  # Wayland protocol
>  va_wayland_drm.c: $(protocol_source_h)
> - at wayland_scanner_rules@
> +%-protocol.c : %.xml
> +       $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@
> +
> +%-server-protocol.h : %.xml
> +       $(AM_V_GEN)$(WAYLAND_SCANNER) server-header < $< > $@
> +
> +%-client-protocol.h : %.xml
> +       $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
>
Hmm all three ? Afaics only the client header is needed. Speaking of
which one shouldn't really have it in git. Can we remove it, please ?

> diff --git a/va/wayland/protocol/Makefile.am b/va/wayland/protocol/Makefile.am
> index 614d8a4..e984e0f 100644
> --- a/va/wayland/protocol/Makefile.am
> +++ b/va/wayland/protocol/Makefile.am
> @@ -21,7 +21,6 @@
>  # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>
>  EXTRA_DIST = \
> -       wayland-drm.xml         \
You still need to ship this file in the tarball. Although better move
the hunk to va/wayland/Makefile.am and nuke this makefile.


> diff --git a/va/wayland/protocol/wayland-drm.xml b/va/wayland/protocol/wayland-drm.xml
> deleted file mode 100644
> index 265d4f8..0000000
> --- a/va/wayland/protocol/wayland-drm.xml
> +++ /dev/null

> diff --git a/va/wayland/wayland-drm.xml b/va/wayland/wayland-drm.xml
> new file mode 100644
> index 0000000..265d4f8
> --- /dev/null
> +++ b/va/wayland/wayland-drm.xml

To avoid this unnecessary noise (and make the patch more readable) you
can use -M when generating the patch.
ie. git format-patch/send-email -M ...

Mildly related: I'm wondering if one shouldn't use "the source" of
this protocol rather than coping it around. If I have to guess I'll
point fingers at wayland-protocols ;-)

And let's not forget that intel-driver could use a similar patch :-P

-Emil


More information about the Libva mailing list