[PATCH weston] configure.ac: make use of wayland-scanner.pc

Bill Spitzak spitzak at gmail.com
Mon Feb 23 14:32:27 PST 2015

wayland-scanner is built as part of "make" in wayland. However it is 
also used to convert the xml descriptions to .c and .h files, which are 
also used by "make".

In some early versions of Wayland this would never work for a new user. 
It would not find wayland-scanner and fail, so "make install" never 
worked and you could not get things working without doing a manual step 
of copying the wayland-scanner executable to the path.

A big annoyance is that once you get wayland to install, this never 
happens again, leading the developers to not notice if it breaks.

A related annoyance is that editing the source for wayland scanner 
should cause the .h/.C files to be regenerated using the new version and 
used to compile the rest of wayland and weston. This can make it easy to 
not realize a bug was introduced into wayland scanner.

My proposed test, with a --prefix to an install directory:

1. clear out the install directory
2. make sure "wayland-scanner" does not exist on the machine
3. go into wayland and type "make install"

Another test I would like to do is:

1. Edit wayland-scanner to put an obvious typo into the .h file
2. Run "make" and insure that it fails.

On 02/23/2015 12:49 PM, Emil Velikov wrote:
> On 23 February 2015 at 19:20, Bill Spitzak <spitzak at gmail.com> wrote:
>> On 02/22/2015 11:52 PM, Pekka Paalanen wrote:
>>>> I'll give Bill and Daniels a chance to comment, but meanwhile:
>>>> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
>> My only concern is that trying to build Wayland from scratch on a machine
>> that does not already have wayland-scanner installed using a single "make"
>> will work. Or, at worst, the error produced makes it obvious what has to be
>> done to fix it.
> I'm a little confused there - what exactly do you mean with
> "wayland-scanner installed" ? Is that having (a) the binary,
> wayland-scanner.pc & friends around, or (b) just the binary ?
> If (a) what is the benefit of bailing(error) out when
> wayland-scanner.pc is missing, despite it being unused ? I'm missing
> something here :-(
>> I wanted to make sure the original patch in the patchwork is still the one
>> being considered. Otherwise this is easy to test.
> Fwiw I'm all for "check wayland-scanner first and fallback to AC_..."
> but others prefer the other way around (sorry to repeat myself so
> much).
> -Emil

More information about the wayland-devel mailing list