[PATCH weston] build: don't manually parse the weston.ini.in templates

Pekka Paalanen ppaalanen at gmail.com
Fri Jun 29 07:37:41 UTC 2018


On Thu, 28 Jun 2018 18:59:01 +0100
Emil Velikov <emil.l.velikov at gmail.com> wrote:

> On 28 June 2018 at 10:58, Quentin Glidic
> <sardemff7+wayland at sardemff7.net> wrote:
> > On 6/27/18 3:04 PM, Emil Velikov wrote:  
> >>
> >> From: Emil Velikov <emil.velikov at collabora.com>
> >>
> >> Adding those to configure.ac ensures that:
> >>   - the weston.ini files are {re,}generated only when needed
> >>   - the .in files are shipped in the tarball
> >>   - all the manual handling of the above can be removed ;-)  
> >
> >
> > Did you actually test that?
> > In configure.ac, "bindir" is "${prefix}/bin" (default value), so you’d end
> > up with "path=${prefix}/bin/weston-flower", and obviously, it won’t launch.
> > Also, though it’s not that used, you can override directories at "make"
> > time.
> > In the end, Makefile is the only place we know the full usable value for
> > directories. (Otherwise, the only case it’ll work is when you pass all the
> > directories as full paths to "./configure".)
> >  
> Hmm I think a good point is to step back a bit and say how the
> weston.ini files should be used.
> Are they meant for builddir only usage (a), are they sort of a
> template that one should copy (b) or other (c).

I believe the weston.ini files in root and ivi-shell/ directories are
examples, which could be used as templates for a custom config
primarily. It would be good if they are correct and usable as is, that
is, they use the directories used by 'make install' when DESTDIR is
*not* given. That way a user can copy the file, have a test run that
works, and then tweak further.

Weston will pick weston.ini from CWD only if it finds it nowhere else,
see weston.ini.man.

If weston cannot find any weston.ini, it will still run with built-in
defaults, which include one launcher icon that should start
weston-terminal. So there is a precedent of a built-in path already
that cannot change at install time. (Whether that should rely on PATH
instead is another question - maybe it should?)

IMO it would be fine to just remove weston-flower and any client that
is normally not installed from the example ini files. weston-terminal
is the most important launcher.

> The patch from Emre suggest (b). My current assumption is on the same
> page, based on the bindir/weston-foo (and friends) instances in
> weston.ini.in.
> 
> I wonder if "make allows you to override everything" is not it's bane.
> Just because you can, don't mean one should.
> All in all people who thinker with that should really know what they're doing.

If Quentin was referring to DESTDIR only, then there should be no
problem. DESTDIR is used for installing into a staging tree which
cannot be executed from. One is expected to copy that into the proper
$prefix before running is possible.

> Having the weston.ini files generated at "make all" means that those
> variables are honoured only at "make all".
> Aka relying that you can override them is a recipe for disaster.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180629/96b8059c/attachment.sig>


More information about the wayland-devel mailing list