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

Giulio Camuffo giuliocamuffo at gmail.com
Sat Jun 27 04:07:51 PDT 2015


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 5cf2aac..152958a 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
 
@@ -450,6 +455,7 @@ if BUILD_CLIENTS
 
 bin_PROGRAMS += weston-terminal weston-info
 
+if BUILD_WESTON_BINARIES
 libexec_PROGRAMS +=				\
 	weston-desktop-shell			\
 	weston-screenshooter			\
@@ -460,6 +466,7 @@ if ENABLE_IVI_SHELL
 libexec_PROGRAMS +=				\
 	weston-ivi-shell-user-interface
 endif
+endif
 
 demo_clients =					\
 	weston-flower				\
@@ -579,6 +586,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 =			\
@@ -586,6 +594,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				\
@@ -697,6 +706,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	\
@@ -712,6 +722,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				\
@@ -722,6 +733,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
@@ -730,7 +742,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				\
@@ -743,6 +757,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 f3b63a1..5158dbf 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
@@ -517,6 +523,8 @@ AC_MSG_RESULT([
 	Native Backend			${WESTON_NATIVE_BACKEND}
 	setuid Install			${enable_setuid_install}
 
+	Buld the weston binaries	${enable_weston_binaries}
+
 	Cairo Renderer			${with_cairo}
 	EGL				${enable_egl}
 	libxkbcommon			${enable_xkbcommon}
-- 
2.4.4



More information about the wayland-devel mailing list