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

Quentin Glidic sardemff7+wayland at sardemff7.net
Thu Jun 28 09:58:06 UTC 2018


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".)

Thanks,

> Note: the abs_top_builddir for weston-flower was swapped with the correct
> bindir. Squashed in here since it was never worked correctly :-\
> 
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> Shout if you feel strongly about splitting the weston-flower fix.
> 
> Based on top of Emre's "ivi-shell: use install paths in example config"
> patch.
> ---
>   Makefile.am   | 22 ++--------------------
>   configure.ac  |  2 +-
>   weston.ini.in |  2 +-
>   3 files changed, 4 insertions(+), 22 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 637dd239..2095aa5a 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -12,23 +12,7 @@ BUILT_SOURCES =
>   
>   AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
>   
> -EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
> -
> -weston.ini : $(srcdir)/weston.ini.in
> -	$(AM_V_GEN)$(SED) \
> -		-e 's|@bindir[@]|$(bindir)|g' \
> -		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
> -		-e 's|@libexecdir[@]|$(libexecdir)|g' \
> -		$< > $@
> -
> -ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
> -	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
> -		-e 's|@bindir[@]|$(bindir)|g' \
> -		-e 's|@libexecdir[@]|$(libexecdir)|g' \
> -		-e 's|@westondatadir[@]|$(westondatadir)|g' \
> -		$< > $@
> -
> -all-local : weston.ini ivi-shell/weston.ini
> +EXTRA_DIST =
>   
>   AM_CFLAGS = $(GCC_CFLAGS)
>   
> @@ -43,9 +27,7 @@ AM_CPPFLAGS = 					\
>   	-DLIBEXECDIR='"$(libexecdir)"'		\
>   	-DBINDIR='"$(bindir)"'
>   
> -CLEANFILES = weston.ini				\
> -	ivi-shell/weston.ini			\
> -	internal-screenshot-00.png		\
> +CLEANFILES = internal-screenshot-00.png		\
>   	$(BUILT_SOURCES)
>   
>   # Libtool race fix
> diff --git a/configure.ac b/configure.ac
> index 2a62b62a..9b7071e7 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -680,7 +680,7 @@ if test "x$enable_systemd_notify" = "xyes"; then
>     PKG_CHECK_MODULES(SYSTEMD_DAEMON, [libsystemd])
>   fi
>   
> -AC_CONFIG_FILES([Makefile libweston/version.h compositor/weston.pc])
> +AC_CONFIG_FILES([Makefile weston.ini ivi-shell/weston.ini libweston/version.h compositor/weston.pc])
>   
>   # AC_CONFIG_FILES needs the full name when running autoconf, so we need to use
>   # libweston_abi_version here, and outside [] because of m4 quoting rules
> diff --git a/weston.ini.in b/weston.ini.in
> index 257c4ec4..e743cc49 100644
> --- a/weston.ini.in
> +++ b/weston.ini.in
> @@ -38,7 +38,7 @@ path=/usr/bin/google-chrome
>   
>   [launcher]
>   icon=/usr/share/icons/gnome/24x24/apps/arts.png
> -path=@abs_top_builddir@/weston-flower
> +path=@bindir@/weston-flower
>   
>   [input-method]
>   path=@libexecdir@/weston-keyboard
> 


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list