diff options
author | Christian Linhart <chris@demorecorder.com> | 2015-06-11 18:58:38 +0200 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2015-07-04 16:25:23 +0200 |
commit | b15c96f9507119e5d38a61d92b4dbcd479ea2099 (patch) | |
tree | dabb250207f014311496ab9251b7090aadbbf021 | |
parent | c5d923d8ff4a9b9fc1aef1c6c6918bab15098d34 (diff) |
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>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/c_client.py | 10 |
3 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index cce0ddb..f3120eb 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/Makefile.am b/src/Makefile.am index 5a3c52a..e06e70b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) diff --git a/src/c_client.py b/src/c_client.py index 70f8429..5fff350 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -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,7 +3106,8 @@ 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) - _c_accessors(self, name, name) + if config_server_side: + _c_accessors(self, name, name) # We generate the manpage afterwards because _c_type_setup has been called. # TODO: what about aux helpers? @@ -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 = ') |