diff options
authorUli Schlachter <>2015-05-06 08:10:53 +0200
committerUli Schlachter <>2015-05-06 08:16:54 +0200
commit5d660ebe872cadcdc85de9d6f9afe05de629c030 (patch)
parent332f357aa662ad61625ee804f93c5503b2a0c3ec (diff)
Do not distribute extensions.c and fix out-of-tree builds
It all started with src/extensions.c being distributed. Thanks to this, tarballs shipped with this generated file and actually building this file was skipped. Fix this by using the nodist_ variant of the SOURCES variable. Due to this oversight (sorry!), the out-of-tree build wasn't actually tested. The rule that generates src/extensions.c was missing $(srcdir) in front of the path to This rule is now fixed and, as suggested by Daphne Pfister, also changed to explicitly call the python interpreter. Configure is changed to look for it. Finally, extensions.c couldn't include errors.h. This worked before, because the C compiler automatically looks for headers in the same directory as the source file. However, for out-of-tree builds, the source directory and build directory are different. Paper over this problem by explicitly making it look in the right directory. Fixes: Signed-off-by: Uli Schlachter <>
2 files changed, 6 insertions, 3 deletions
diff --git a/ b/
index 746cde3..bdf4a30 100644
--- a/
+++ b/
@@ -20,8 +20,9 @@ xcbinclude_HEADERS = src/xcb_errors.h
-libxcb_errors_la_SOURCES = src/xcb_errors.c src/extensions.c
-libxcb_errors_la_CPPFLAGS = $(XCB_CFLAGS) $(XPROTO_CFLAGS)
+libxcb_errors_la_SOURCES = src/xcb_errors.c
+nodist_libxcb_errors_la_SOURCES = src/extensions.c
+libxcb_errors_la_CPPFLAGS = $(XCB_CFLAGS) $(XPROTO_CFLAGS) -I$(srcdir)/src
libxcb_errors_la_LIBADD = $(XCB_LIBS) $(XPROTO_LIBS)
libxcb_errors_la_LDFLAGS = -version-info 0:0:0 -no-undefined -export-symbols-regex '^xcb_errors_'
@@ -36,5 +37,5 @@ tests_test_LDADD = $(XCB_LIBS)
CLEANFILES = src/extensions.c
src/extensions.c: src/
- $(AM_V_GEN)src/ $@.tmp ${XCBPROTO_XCBINCLUDEDIR}/*.xml && \
+ $(AM_V_GEN)$(PYTHON) $(srcdir)/src/ $@.tmp ${XCBPROTO_XCBINCLUDEDIR}/*.xml && \
mv $@.tmp $@
diff --git a/ b/
index d0bcc63..0379093 100644
--- a/
+++ b/
@@ -17,6 +17,8 @@ AC_TYPE_SSIZE_T
XCB_UTIL_COMMON([1.4], [1.6])
# Checks for xcb-proto's XML files, inspired from libxcb's