[PATCH weston v2] Makefile.am: Fix protocol source files usage

Quentin Glidic sardemff7+wayland at sardemff7.net
Sat Feb 1 12:39:12 PST 2014


From: Quentin Glidic <sardemff7+git at sardemff7.net>

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---

v2: Update .gitignore (Thanks Jasper)

 .gitignore               |   1 +
 Makefile.am              | 189 ++++++++++++++++++++++++-----------------------
 clients/.gitignore       |  18 -----
 desktop-shell/.gitignore |   4 -
 src/.gitignore           |  12 ---
 tests/.gitignore         |   5 --
 xwayland/.gitignore      |   2 -
 7 files changed, 97 insertions(+), 134 deletions(-)
 delete mode 100644 desktop-shell/.gitignore
 delete mode 100644 xwayland/.gitignore

diff --git a/.gitignore b/.gitignore
index 111c56c..19ff60f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,3 +33,4 @@ Makefile
 Makefile.in
 TAGS
 protocol/.*.valid
+protocol/src/
diff --git a/Makefile.am b/Makefile.am
index 6032164..a480616 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,7 @@ AM_CPPFLAGS = 					\
 	-I$(top_builddir)/clients		\
 	-I$(top_builddir)/tests			\
 	-I$(top_srcdir)/shared			\
+	-I$(top_srcdir)/protocol/src		\
 	-DDATADIR='"$(datadir)"'		\
 	-DMODULEDIR='"$(moduledir)"'		\
 	-DLIBEXECDIR='"$(libexecdir)"'		\
@@ -52,21 +53,21 @@ weston_SOURCES =					\
 	src/filter.c					\
 	src/filter.h					\
 	src/screenshooter.c				\
-	src/screenshooter-protocol.c			\
-	src/screenshooter-server-protocol.h		\
+	protocol/src/screenshooter-protocol.c		\
+	protocol/src/screenshooter-server-protocol.h	\
 	src/clipboard.c					\
-	src/text-cursor-position-protocol.c		\
-	src/text-cursor-position-server-protocol.h	\
+	protocol/src/text-cursor-position-protocol.c	\
+	protocol/src/text-cursor-position-server-protocol.h	\
 	src/zoom.c					\
 	src/text-backend.c				\
-	src/text-protocol.c				\
-	src/text-server-protocol.h			\
-	src/input-method-protocol.c			\
-	src/input-method-server-protocol.h		\
-	src/workspaces-protocol.c			\
-	src/workspaces-server-protocol.h		\
-	src/scaler-protocol.c				\
-	src/scaler-server-protocol.h			\
+	protocol/src/text-protocol.c			\
+	protocol/src/text-server-protocol.h		\
+	protocol/src/input-method-protocol.c		\
+	protocol/src/input-method-server-protocol.h	\
+	protocol/src/workspaces-protocol.c		\
+	protocol/src/workspaces-server-protocol.h	\
+	protocol/src/scaler-protocol.c			\
+	protocol/src/scaler-server-protocol.h		\
 	src/bindings.c					\
 	src/animation.c					\
 	src/noop-renderer.c				\
@@ -333,19 +334,19 @@ spring_tool_SOURCES =				\
 	shared/matrix.h				\
 	src/compositor.h
 
-BUILT_SOURCES +=					\
-	src/screenshooter-server-protocol.h		\
-	src/screenshooter-protocol.c			\
-	src/text-cursor-position-server-protocol.h	\
-	src/text-cursor-position-protocol.c		\
-	src/text-protocol.c				\
-	src/text-server-protocol.h			\
-	src/input-method-protocol.c			\
-	src/input-method-server-protocol.h		\
-	src/workspaces-server-protocol.h		\
-	src/workspaces-protocol.c			\
-	src/scaler-server-protocol.h			\
-	src/scaler-protocol.c
+BUILT_SOURCES +=						\
+	protocol/src/screenshooter-server-protocol.h		\
+	protocol/src/screenshooter-protocol.c			\
+	protocol/src/text-cursor-position-server-protocol.h	\
+	protocol/src/text-cursor-position-protocol.c		\
+	protocol/src/text-protocol.c				\
+	protocol/src/text-server-protocol.h			\
+	protocol/src/input-method-protocol.c			\
+	protocol/src/input-method-server-protocol.h		\
+	protocol/src/workspaces-server-protocol.h		\
+	protocol/src/workspaces-protocol.c			\
+	protocol/src/scaler-server-protocol.h			\
+	protocol/src/scaler-protocol.c
 
 if BUILD_CLIENTS
 
@@ -419,14 +420,14 @@ noinst_LTLIBRARIES += libtoytoolkit.la
 libtoytoolkit_la_SOURCES =				\
 	clients/window.c				\
 	clients/window.h				\
-	clients/text-cursor-position-protocol.c		\
-	clients/text-cursor-position-client-protocol.h	\
-	clients/scaler-protocol.c			\
-	clients/scaler-client-protocol.h		\
-	clients/workspaces-protocol.c			\
-	clients/workspaces-client-protocol.h		\
-	clients/xdg-shell-protocol.c                    \
-	clients/xdg-shell-client-protocol.h
+	protocol/src/text-cursor-position-protocol.c	\
+	protocol/src/text-cursor-position-client-protocol.h	\
+	protocol/src/scaler-protocol.c			\
+	protocol/src/scaler-client-protocol.h		\
+	protocol/src/workspaces-protocol.c		\
+	protocol/src/workspaces-client-protocol.h	\
+	protocol/src/xdg-shell-protocol.c		\
+	protocol/src/xdg-shell-client-protocol.h
 
 
 libtoytoolkit_la_LIBADD =			\
@@ -441,8 +442,8 @@ weston_flower_CFLAGS = $(CLIENT_CFLAGS)
 
 weston_screenshooter_SOURCES =			\
 	clients/screenshot.c				\
-	clients/screenshooter-protocol.c		\
-	clients/screenshooter-client-protocol.h		\
+	protocol/src/screenshooter-protocol.c		\
+	protocol/src/screenshooter-client-protocol.h	\
 	shared/os-compatibility.c		\
 	shared/os-compatibility.h
 weston_screenshooter_LDADD = $(CLIENT_LIBS)
@@ -524,25 +525,25 @@ if HAVE_PANGO
 demo_clients += weston-editor
 weston_editor_SOURCES =				\
 	clients/editor.c			\
-	clients/text-protocol.c			\
-	clients/text-client-protocol.h
+	protocol/src/text-protocol.c		\
+	protocol/src/text-client-protocol.h
 weston_editor_LDADD = libtoytoolkit.la $(PANGO_LIBS)
 weston_editor_CFLAGS = $(CLIENT_CFLAGS) $(PANGO_CFLAGS)
 endif
 
 weston_keyboard_SOURCES =			\
 	clients/keyboard.c			\
-	clients/desktop-shell-client-protocol.h	\
-	clients/desktop-shell-protocol.c	\
-	clients/input-method-protocol.c		\
-	clients/input-method-client-protocol.h
+	protocol/src/desktop-shell-client-protocol.h	\
+	protocol/src/desktop-shell-protocol.c	\
+	protocol/src/input-method-protocol.c	\
+	protocol/src/input-method-client-protocol.h
 weston_keyboard_LDADD = libtoytoolkit.la
 weston_keyboard_CFLAGS = $(CLIENT_CFLAGS)
 
 weston_simple_im_SOURCES =			\
 	clients/weston-simple-im.c		\
-	clients/input-method-protocol.c		\
-	clients/input-method-client-protocol.h
+	protocol/src/input-method-protocol.c	\
+	protocol/src/input-method-client-protocol.h
 weston_simple_im_LDADD = $(CLIENT_LIBS)
 weston_simple_im_CFLAGS = $(CLIENT_CFLAGS)
 
@@ -554,8 +555,8 @@ weston_info_LDADD = $(WESTON_INFO_LIBS)
 
 weston_desktop_shell_SOURCES =			\
 	clients/desktop-shell.c			\
-	clients/desktop-shell-client-protocol.h	\
-	clients/desktop-shell-protocol.c
+	protocol/src/desktop-shell-client-protocol.h	\
+	protocol/src/desktop-shell-protocol.c
 weston_desktop_shell_LDADD = libtoytoolkit.la
 weston_desktop_shell_CFLAGS = $(CLIENT_CFLAGS)
 
@@ -570,8 +571,8 @@ libexec_PROGRAMS += weston-screensaver
 weston_screensaver_SOURCES =			\
 	clients/wscreensaver.c			\
 	clients/wscreensaver.h			\
-	clients/desktop-shell-client-protocol.h	\
-	clients/desktop-shell-protocol.c	\
+	protocol/src/desktop-shell-client-protocol.h	\
+	protocol/src/desktop-shell-protocol.c	\
 	clients/wscreensaver-glue.c		\
 	clients/wscreensaver-glue.h		\
 	clients/glmatrix.c			\
@@ -585,23 +586,23 @@ endif
 
 endif
 
-BUILT_SOURCES +=					\
-	clients/screenshooter-client-protocol.h		\
-	clients/screenshooter-protocol.c		\
-	clients/text-cursor-position-client-protocol.h	\
-	clients/text-cursor-position-protocol.c		\
-	clients/text-protocol.c				\
-	clients/text-client-protocol.h			\
-	clients/input-method-protocol.c			\
-	clients/input-method-client-protocol.h		\
-	clients/desktop-shell-client-protocol.h		\
-	clients/desktop-shell-protocol.c		\
-	clients/scaler-client-protocol.h		\
-	clients/scaler-protocol.c			\
-	clients/workspaces-client-protocol.h		\
-	clients/workspaces-protocol.c			\
-	clients/xdg-shell-protocol.c                    \
-	clients/xdg-shell-client-protocol.h
+BUILT_SOURCES +=						\
+	protocol/src/screenshooter-client-protocol.h		\
+	protocol/src/screenshooter-protocol.c			\
+	protocol/src/text-cursor-position-client-protocol.h	\
+	protocol/src/text-cursor-position-protocol.c		\
+	protocol/src/text-protocol.c				\
+	protocol/src/text-client-protocol.h			\
+	protocol/src/input-method-protocol.c			\
+	protocol/src/input-method-client-protocol.h		\
+	protocol/src/desktop-shell-client-protocol.h		\
+	protocol/src/desktop-shell-protocol.c			\
+	protocol/src/scaler-client-protocol.h			\
+	protocol/src/scaler-protocol.c				\
+	protocol/src/workspaces-client-protocol.h		\
+	protocol/src/workspaces-protocol.c			\
+	protocol/src/xdg-shell-protocol.c			\
+	protocol/src/xdg-shell-client-protocol.h
 
 
 westondatadir = $(datadir)/weston
@@ -635,6 +636,7 @@ if ENABLE_DESKTOP_SHELL
 module_LTLIBRARIES += desktop-shell.la
 
 desktop_shell_la_CPPFLAGS =			\
+	-I$(top_srcdir)/protocol/src		\
 	-I$(top_srcdir)/shared			\
 	-I$(top_srcdir)/src			\
 	-I$(top_builddir)/src			\
@@ -653,16 +655,16 @@ desktop_shell_la_SOURCES =				\
 	desktop-shell/shell.c				\
 	desktop-shell/exposay.c				\
 	desktop-shell/input-panel.c			\
-	desktop-shell/desktop-shell-protocol.c		\
-	desktop-shell/desktop-shell-server-protocol.h	\
-	desktop-shell/xdg-shell-protocol.c		\
-	desktop-shell/xdg-shell-server-protocol.h
+	protocol/src/desktop-shell-protocol.c		\
+	protocol/src/desktop-shell-server-protocol.h	\
+	protocol/src/xdg-shell-protocol.c		\
+	protocol/src/xdg-shell-server-protocol.h
 
 BUILT_SOURCES +=					\
-	desktop-shell/desktop-shell-protocol.c		\
-	desktop-shell/desktop-shell-server-protocol.h	\
-	desktop-shell/xdg-shell-protocol.c		\
-	desktop-shell/xdg-shell-server-protocol.h
+	protocol/src/desktop-shell-protocol.c		\
+	protocol/src/desktop-shell-server-protocol.h	\
+	protocol/src/xdg-shell-protocol.c		\
+	protocol/src/xdg-shell-server-protocol.h
 endif
 
 
@@ -671,6 +673,7 @@ if ENABLE_XWAYLAND
 module_LTLIBRARIES += xwayland.la
 
 xwayland_la_CPPFLAGS =				\
+	-I$(top_srcdir)/protocol/src		\
 	-I$(top_srcdir)/shared			\
 	-I$(top_srcdir)/src			\
 	-I$(top_builddir)/src			\
@@ -695,14 +698,14 @@ xwayland_la_SOURCES =				\
 	xwayland/selection.c			\
 	xwayland/dnd.c				\
 	xwayland/launcher.c			\
-	xwayland/xserver-protocol.c		\
-	xwayland/xserver-server-protocol.h	\
+	protocol/src/xserver-protocol.c		\
+	protocol/src/xserver-server-protocol.h	\
 	xwayland/hash.c				\
 	xwayland/hash.h
 
 BUILT_SOURCES +=				\
-	xwayland/xserver-protocol.c		\
-	xwayland/xserver-server-protocol.h
+	protocol/src/xserver-protocol.c		\
+	protocol/src/xserver-server-protocol.h
 endif
 
 
@@ -810,8 +813,8 @@ weston_test_la_LDFLAGS = $(test_module_ldflags)
 weston_test_la_CFLAGS = $(GCC_CFLAGS) $(COMPOSITOR_CFLAGS)
 weston_test_la_SOURCES =			\
 	tests/weston-test.c			\
-	tests/wayland-test-protocol.c		\
-	tests/wayland-test-server-protocol.h
+	protocol/src/wayland-test-protocol.c		\
+	protocol/src/wayland-test-server-protocol.h
 
 if ENABLE_EGL
 weston_test_la_CFLAGS += $(EGL_TESTS_CFLAGS)
@@ -835,8 +838,8 @@ vertex_clip_test_LDADD = libtest-runner.la -lm -lrt
 libtest_client_la_SOURCES =		\
 	tests/weston-test-client-helper.c	\
 	tests/weston-test-client-helper.h	\
-	tests/wayland-test-protocol.c		\
-	tests/wayland-test-client-protocol.h
+	protocol/src/wayland-test-protocol.c		\
+	protocol/src/wayland-test-client-protocol.h
 libtest_client_la_LIBADD = $(TEST_CLIENT_LIBS) libshared.la libtest-runner.la
 
 bad_buffer_weston_SOURCES = tests/bad-buffer-test.c
@@ -851,7 +854,7 @@ event_weston_LDADD = libtest-client.la
 button_weston_SOURCES = tests/button-test.c
 button_weston_LDADD = libtest-client.la
 
-text_weston_SOURCES = tests/text-test.c tests/text-protocol.c
+text_weston_SOURCES = tests/text-test.c protocol/src/text-protocol.c
 text_weston_LDADD = libtest-client.la
 
 subsurface_weston_SOURCES = tests/subsurface-test.c
@@ -890,12 +893,12 @@ endif
 
 EXTRA_DIST += tests/weston-tests-env
 
-BUILT_SOURCES +=				\
-	tests/wayland-test-protocol.c		\
-	tests/wayland-test-server-protocol.h	\
-	tests/wayland-test-client-protocol.h	\
-	tests/text-protocol.c			\
-	tests/text-client-protocol.h
+BUILT_SOURCES +=					\
+	protocol/src/wayland-test-protocol.c		\
+	protocol/src/wayland-test-server-protocol.h	\
+	protocol/src/wayland-test-client-protocol.h	\
+	protocol/src/text-protocol.c			\
+	protocol/src/text-client-protocol.h
 
 EXTRA_DIST +=					\
 	protocol/desktop-shell.xml		\
@@ -936,11 +939,11 @@ CLEANFILES += $(man_MANS)
 
 wayland_protocoldir = $(top_srcdir)/protocol
 
-%-protocol.c : $(wayland_protocoldir)/%.xml
-	$(AM_V_GEN)$(wayland_scanner) code < $< > $@
+protocol/src/%-protocol.c : $(wayland_protocoldir)/%.xml
+	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
 
-%-server-protocol.h : $(wayland_protocoldir)/%.xml
-	$(AM_V_GEN)$(wayland_scanner) server-header < $< > $@
+protocol/src/%-server-protocol.h : $(wayland_protocoldir)/%.xml
+	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
 
-%-client-protocol.h : $(wayland_protocoldir)/%.xml
-	$(AM_V_GEN)$(wayland_scanner) client-header < $< > $@
+protocol/src/%-client-protocol.h : $(wayland_protocoldir)/%.xml
+	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
diff --git a/clients/.gitignore b/clients/.gitignore
index 4112bbc..1c685c7 100644
--- a/clients/.gitignore
+++ b/clients/.gitignore
@@ -21,22 +21,8 @@ weston-subsurfaces
 weston-transformed
 weston-view
 
-desktop-shell-client-protocol.h
-desktop-shell-protocol.c
-input-method-protocol.c
-input-method-client-protocol.h
 weston-keyboard
 libtoytoolkit.a
-screenshooter-client-protocol.h
-screenshooter-protocol.c
-scaler-client-protocol.h
-scaler-protocol.c
-tablet-shell-client-protocol.h
-tablet-shell-protocol.c
-text-client-protocol.h
-text-cursor-position-client-protocol.h
-text-cursor-position-protocol.c
-text-protocol.c
 weston-desktop-shell
 weston-info
 weston-screensaver
@@ -44,8 +30,4 @@ weston-screenshooter
 weston-tablet-shell
 weston-terminal
 weston-multi-resource
-workspaces-client-protocol.h
-workspaces-protocol.c
 weston-simple-im
-xdg-shell-client-protocol.h
-xdg-shell-protocol.c
diff --git a/desktop-shell/.gitignore b/desktop-shell/.gitignore
deleted file mode 100644
index ff42e5f..0000000
--- a/desktop-shell/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-desktop-shell-protocol.c
-desktop-shell-server-protocol.h
-xdg-shell-protocol.c
-xdg-shell-server-protocol.h
diff --git a/src/.gitignore b/src/.gitignore
index 024594c..886651d 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -2,16 +2,4 @@ git-version.h
 version.h
 weston
 weston-launch
-screenshooter-protocol.c
-screenshooter-server-protocol.h
 spring-tool
-text-cursor-position-protocol.c
-text-cursor-position-server-protocol.h
-text-protocol.c
-text-server-protocol.h
-workspaces-protocol.c
-workspaces-server-protocol.h
-input-method-protocol.c
-input-method-server-protocol.h
-scaler-server-protocol.h
-scaler-protocol.c
diff --git a/tests/.gitignore b/tests/.gitignore
index dc4a71a..25e7344 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -7,8 +7,3 @@ matrix-test
 setbacklight
 test-client
 test-text-client
-text-client-protocol.h
-text-protocol.c
-wayland-test-client-protocol.h
-wayland-test-protocol.c
-wayland-test-server-protocol.h
diff --git a/xwayland/.gitignore b/xwayland/.gitignore
deleted file mode 100644
index 2c11e7b..0000000
--- a/xwayland/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-xserver-protocol.c
-xserver-server-protocol.h
-- 
1.8.5.3



More information about the wayland-devel mailing list