make support for server side stuff optional
and make it disabled by default with an EXPERIMENTAL warning reason: this feature is unfinished and we want to have flexibility for ABI/API changes, while still being able to make a release soon Signed-off-by: Christian Linhart <chris@demorecorder.com>
This commit is contained in:
parent
c5d923d8ff
commit
b15c96f950
|
@ -252,6 +252,10 @@ if test "x$LAUNCHD" = xyes ; then
|
|||
AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(serverside-support, AS_HELP_STRING([--with-serverside-support], [Build with support for server-side usage of xcb. This is still EXPERIMENTAL! ABI/API may change! (default: no)]), [XCB_SERVERSIDE_SUPPORT=$withval], [XCB_SERVERSIDE_SUPPORT=no])
|
||||
|
||||
AM_CONDITIONAL(XCB_SERVERSIDE_SUPPORT, test "x$XCB_SERVERSIDE_SUPPORT" = "xyes")
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
doc/Makefile
|
||||
|
|
|
@ -248,9 +248,15 @@ libman_DATA = $(BUILT_MAN_PAGES)
|
|||
BUILT_SOURCES = $(EXTSOURCES) $(BUILT_MAN_PAGES)
|
||||
CLEANFILES = $(EXTSOURCES) $(EXTHEADERS) $(BUILT_MAN_PAGES)
|
||||
|
||||
C_CLIENT_PY_EXTRA_ARGS =
|
||||
if XCB_SERVERSIDE_SUPPORT
|
||||
C_CLIENT_PY_EXTRA_ARGS += --server-side
|
||||
endif
|
||||
|
||||
$(EXTSOURCES): c_client.py $(XCBPROTO_XCBINCLUDEDIR)/$(@:.c=.xml)
|
||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/c_client.py -c "$(PACKAGE_STRING)" -l "$(XORG_MAN_PAGE)" \
|
||||
-s "$(LIB_MAN_SUFFIX)" -p $(XCBPROTO_XCBPYTHONDIR) \
|
||||
$(C_CLIENT_PY_EXTRA_ARGS) \
|
||||
$(XCBPROTO_XCBINCLUDEDIR)/$(@:.c=.xml)
|
||||
|
||||
$(BUILT_MAN_PAGES): $(EXTSOURCES)
|
||||
|
|
|
@ -8,6 +8,9 @@ import re
|
|||
|
||||
# Jump to the bottom of this file for the main routine
|
||||
|
||||
#config settings (can be changed with commandline options)
|
||||
config_server_side = False
|
||||
|
||||
# Some hacks to make the API more readable, and to keep backwards compability
|
||||
_cname_re = re.compile('([A-Z0-9][a-z]+|[A-Z0-9]+(?![a-z])|[a-z]+)')
|
||||
_cname_special_cases = {'DECnet':'decnet'}
|
||||
|
@ -3103,6 +3106,7 @@ def c_request(self, name):
|
|||
if self.c_need_aux:
|
||||
_c_request_helper(self, name, void=True, regular=False, aux=True)
|
||||
_c_request_helper(self, name, void=True, regular=True, aux=True)
|
||||
if config_server_side:
|
||||
_c_accessors(self, name, name)
|
||||
|
||||
# We generate the manpage afterwards because _c_type_setup has been called.
|
||||
|
@ -3214,7 +3218,7 @@ output = {'open' : c_open,
|
|||
|
||||
# Check for the argument that specifies path to the xcbgen python package.
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'c:l:s:p:m')
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'c:l:s:p:m', ["server-side"])
|
||||
except getopt.GetoptError as err:
|
||||
print(err)
|
||||
print('Usage: c_client.py -c center_footer -l left_footer -s section [-p path] file.xml')
|
||||
|
@ -3229,6 +3233,8 @@ for (opt, arg) in opts:
|
|||
section=arg
|
||||
if opt == '-p':
|
||||
sys.path.insert(1, arg)
|
||||
if opt == '--server-side':
|
||||
config_server_side=True
|
||||
elif opt == '-m':
|
||||
manpaths = True
|
||||
sys.stdout.write('man_MANS = ')
|
||||
|
|
Loading…
Reference in New Issue