[PATCH weston 11/11] configure: add an option to allow building only the libraries

Hardening rdp.effort at gmail.com
Tue Jun 23 10:37:07 PDT 2015


Le 22/06/2015 22:02, Giulio Camuffo a écrit :
> the --enable/disable-weston-binaries enables or disables the creation
> of 'weston', 'weston-launch' and all the binaries that are
> installed in $prefix/lib/libexec. This allows, together with
> --enable-clients, to only build the libraries, making possible to
> build and install different libweston versions at the same time.
> ---
>  Makefile.am  | 15 +++++++++++++++
>  configure.ac |  8 ++++++++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 2d24bcc..43b69ad 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -106,6 +106,8 @@ nodist_libweston_ at ABI_VERSION@_la_SOURCES =		\
>  
>  BUILT_SOURCES += $(nodist_libweston_ at ABI_VERSION@_la_SOURCES)
>  
> +
> +if BUILD_WESTON_BINARIES
>  bin_PROGRAMS += weston
>  
>  weston_LDFLAGS = -export-dynamic
> @@ -135,6 +137,7 @@ nodist_weston_SOURCES =					\
>  	protocol/text-server-protocol.h			\
>  	protocol/input-method-protocol.c		\
>  	protocol/input-method-server-protocol.h
> +endif
>  
>  BUILT_SOURCES += $(nodist_weston_SOURCES)
>  
> @@ -178,6 +181,7 @@ endif
>  .FORCE :
>  
>  if BUILD_WESTON_LAUNCH
> +if BUILD_WESTON_BINARIES
>  bin_PROGRAMS += weston-launch
>  weston_launch_SOURCES = src/weston-launch.c src/weston-launch.h
>  weston_launch_CPPFLAGS = -DBINDIR='"$(bindir)"'
> @@ -200,6 +204,7 @@ install-exec-hook:
>  		false; \
>  	fi
>  endif
> +endif # BUILD_WESTON_BINARIES
>  
>  endif # BUILD_WESTON_LAUNCH
>  
> @@ -445,6 +450,7 @@ if BUILD_CLIENTS
>  
>  bin_PROGRAMS += weston-terminal weston-info
>  
> +if BUILD_WESTON_BINARIES
>  libexec_PROGRAMS +=				\
>  	weston-desktop-shell			\
>  	weston-screenshooter			\
> @@ -455,6 +461,7 @@ if ENABLE_IVI_SHELL
>  libexec_PROGRAMS +=				\
>  	weston-ivi-shell-user-interface
>  endif
> +endif
>  
>  demo_clients =					\
>  	weston-flower				\
> @@ -574,6 +581,7 @@ weston_flower_SOURCES = clients/flower.c
>  weston_flower_LDADD = libtoytoolkit.la
>  weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
>  
> +if BUILD_WESTON_BINARIES
>  weston_screenshooter_SOURCES =				\
>  	clients/screenshot.c
>  nodist_weston_screenshooter_SOURCES =			\
> @@ -581,6 +589,7 @@ nodist_weston_screenshooter_SOURCES =			\
>  	protocol/screenshooter-client-protocol.h
>  weston_screenshooter_LDADD = $(CLIENT_LIBS) libshared.la
>  weston_screenshooter_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
> +endif
>  
>  weston_terminal_SOURCES = 				\
>  	clients/terminal.c				\
> @@ -692,6 +701,7 @@ weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
>  weston_editor_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
>  endif
>  
> +if BUILD_WESTON_BINARIES
>  weston_keyboard_SOURCES = clients/keyboard.c
>  nodist_weston_keyboard_SOURCES =			\
>  	protocol/desktop-shell-client-protocol.h	\
> @@ -707,6 +717,7 @@ nodist_weston_simple_im_SOURCES =		\
>  	protocol/input-method-client-protocol.h
>  weston_simple_im_LDADD = $(CLIENT_LIBS)
>  weston_simple_im_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
> +endif
>  
>  weston_info_SOURCES = 					\
>  	clients/weston-info.c				\
> @@ -717,6 +728,7 @@ nodist_weston_info_SOURCES =				\
>  weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
>  weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
>  
> +if BUILD_WESTON_BINARIES
>  weston_desktop_shell_SOURCES = 				\
>  	clients/desktop-shell.c				\
>  	shared/helpers.h
> @@ -725,7 +737,9 @@ nodist_weston_desktop_shell_SOURCES =			\
>  	protocol/desktop-shell-protocol.c
>  weston_desktop_shell_LDADD = libtoytoolkit.la
>  weston_desktop_shell_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
> +endif
>  
> +if BUILD_WESTON_BINARIES
>  if ENABLE_IVI_SHELL
>  weston_ivi_shell_user_interface_SOURCES = 				\
>  	clients/ivi-shell-user-interface.c				\
> @@ -738,6 +752,7 @@ nodist_weston_ivi_shell_user_interface_SOURCES =			\
>  weston_ivi_shell_user_interface_LDADD = libtoytoolkit.la
>  weston_ivi_shell_user_interface_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
>  endif
> +endif
>  
>  if BUILD_FULL_GL_CLIENTS
>  demo_clients += weston-gears
> diff --git a/configure.ac b/configure.ac
> index f6780e8..3578811 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -357,6 +357,12 @@ PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
>  AS_IF([test "x$have_systemd_login_209" = "xyes"],
>        [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
>  
> +AC_ARG_ENABLE(weston-binaries,
> +              AS_HELP_STRING([--enable-weston-binaries],
> +                             [build the weston binaries]),,
> +              enable_weston_binaries=yes)
> +AM_CONDITIONAL(BUILD_WESTON_BINARIES, test x$enable_weston_binaries == xyes)
> +
>  AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
>  AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
>  if test x$enable_weston_launch == xyes; then
> @@ -522,6 +528,8 @@ AC_MSG_RESULT([
>  	Native Backend			${WESTON_NATIVE_BACKEND}
>  	setuid Install			${enable_setuid_install}
>  
> +	Buld the weston binaries	${enable_weston_binaries}
> +

s/Buld/Build/

>  	Cairo Renderer			${with_cairo}
>  	EGL				${enable_egl}
>  	libxkbcommon			${enable_xkbcommon}
> 

Otherwise:

Reviewed-By: David FORT <contact at hardening-consulting.com>

-- 
David FORT
website: http://www.hardening-consulting.com/



More information about the wayland-devel mailing list