summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2020-07-24 13:31:03 +1000
committerRan Benita <ran@unusedvar.com>2020-07-25 11:05:14 +0300
commitce5eb1ac6d542bea11222670ec8438cdd074a833 (patch)
tree4695eaa208645c4fe976230c841489c561ddeb8d /tools
parenta472e030ea72c6f901dfec572ccbecb5b1b1f3d6 (diff)
downloadxorg-lib-libxkbcommon-ce5eb1ac6d542bea11222670ec8438cdd074a833.tar.gz
tools: link the tools against libxkbcommon.so only
The tools previously linked against a static version (by simply recompiling everythiong). This isn't necessary, we can link them against libxkbcommon.so. Only exception: The xbkcli-compile-keymap tool needs a private API for the --kccgst flag. Avoid this by disabling this flag in the installed tool and building the same tool, statically linked but not-installed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/compile-keymap.c8
-rw-r--r--tools/xkbcli-compile-keymap.14
2 files changed, 8 insertions, 4 deletions
diff --git a/tools/compile-keymap.c b/tools/compile-keymap.c
index be2eaeb..370a67c 100644
--- a/tools/compile-keymap.c
+++ b/tools/compile-keymap.c
@@ -56,8 +56,10 @@ usage(char **argv)
"Options:\n"
" --verbose\n"
" Enable verbose debugging output\n"
+#if ENABLE_PRIVATE_APIS
" --kccgst\n"
" Print a keymap which only includes the KcCGST component names instead of the full keymap\n"
+#endif
" --rmlvo\n"
" Print the full RMLVO with the defaults filled in for missing elements\n"
" --from-xkb\n"
@@ -111,7 +113,9 @@ parse_options(int argc, char **argv, struct xkb_rule_names *names)
static struct option opts[] = {
{"help", no_argument, 0, 'h'},
{"verbose", no_argument, 0, OPT_VERBOSE},
+#if ENABLE_PRIVATE_APIS
{"kccgst", no_argument, 0, OPT_KCCGST},
+#endif
{"rmlvo", no_argument, 0, OPT_RMLVO},
{"from-xkb", no_argument, 0, OPT_FROM_XKB},
{"include", required_argument, 0, OPT_INCLUDE},
@@ -191,6 +195,7 @@ print_rmlvo(struct xkb_context *ctx, const struct xkb_rule_names *rmlvo)
static bool
print_kccgst(struct xkb_context *ctx, const struct xkb_rule_names *rmlvo)
{
+#if ENABLE_PRIVATE_APIS
struct xkb_component_names kccgst;
if (!xkb_components_from_rules(ctx, rmlvo, &kccgst))
@@ -209,6 +214,9 @@ print_kccgst(struct xkb_context *ctx, const struct xkb_rule_names *rmlvo)
free(kccgst.symbols);
return true;
+#else
+ return false;
+#endif
}
static bool
diff --git a/tools/xkbcli-compile-keymap.1 b/tools/xkbcli-compile-keymap.1
index eb4b0d3..64c4263 100644
--- a/tools/xkbcli-compile-keymap.1
+++ b/tools/xkbcli-compile-keymap.1
@@ -20,10 +20,6 @@ Print help and exit
Enable verbose debugging output
.
.TP
-\fB\-\-kccgst\fR
-Print a keymap which only includes the KcCGST component names instead of the full keymap
-.
-.TP
\fB\-\-rmlvo\fR
Print the full RMLVO with the defaults filled in for missing elements
.