diff options
author | Etienne Brateau <etienne.brateau@gmail.com> | 2024-03-10 00:48:38 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-03-10 17:00:12 +0100 |
commit | 3358b1473f52876c21e3acafe8f7eac41d01a290 (patch) | |
tree | 660b679180fd5254cf41b9d7d3f82bbb0f5ad3b8 /console-client/Makefile | |
parent | 66c891b1cb9ba42bd1824ef0dbffba503697c405 (diff) | |
download | hurd-3358b1473f52876c21e3acafe8f7eac41d01a290.tar.gz hurd-3358b1473f52876c21e3acafe8f7eac41d01a290.tar.bz2 hurd-3358b1473f52876c21e3acafe8f7eac41d01a290.zip |
console-client: use xkbcommon instead of x11 for xkb extended support
This allow to reduce the dependencies, only xkbcommon (keyboard support
only) is required instead of the whole x11 library + lex + yacc.
This replacement allow to reduce the code size, now features are handled
by xkbcommon itself.
The functionnalites remain the sames (actions are reimplemented
but in the code directly as it’s impossible to add custom actions).
The custom xkb data files are removed as we can now directly use the
standard ones from xkeyboard-config.
The configuration to launch the console keyboard modules changed to now
directly configure the model+layout+variat+options directly.
Tested by compiling with and without xkbcommon.
Tested X11 (ran i3 correctly).
Composing is still working.
Message-ID: <20240309234838.31923-1-etienne.brateau@gmail.com>
Diffstat (limited to 'console-client/Makefile')
-rw-r--r-- | console-client/Makefile | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/console-client/Makefile b/console-client/Makefile index e4d9504d..b991cd73 100644 --- a/console-client/Makefile +++ b/console-client/Makefile @@ -40,7 +40,6 @@ console-LDFLAGS = -Wl,-E CPPFLAGS += -I$(CURDIR)/xkb -I$(srcdir)/xkb $(libdaemon_CFLAGS) LFLAGS = -i -YFLAGS = -by XKB_DATA_FILES = keymap/hurd types/hurd symbols/hurd # In seeking, thou shalt find it! @@ -96,38 +95,12 @@ $(DESTDIR)$(module-dir)/%: % $(CFLAGS) $($*-CFLAGS) $(LDFLAGS) \ $^ '-Wl,-(' $($*-LDLIBS) '-Wl,-)' -lex.c: lex.l parser.tab.h -%.tab.h %.c: %.y - if $(YACC) $(YFLAGS) -d $<; then \ - mv y.tab.h $*.tab.h; \ - mv y.tab.c $*.c; \ - fi - -XKB_SRCS = xkb/compose.c xkb/kstoucs.c xkb/parser.y xkb/lex.l \ - xkb/xkb.c xkb/xkbdata.c xkb/xkbtimer.c -ifeq ($(HAVE_X11),yes) +XKB_SRCS = +ifeq ($(HAVE_XKBCOMMON),yes) +XKB_SRCS = xkb/xkb.c xkb/xkbtimer.c XKB_UNITS = $(basename $(notdir $(XKB_SRCS))) pc_kbd.so.$(hurd-version): $(addsuffix _pic.o,$(XKB_UNITS)) -pc-kbd-CFLAGS = -DXKB_SUPPORT -DXKB_DATA_DIR=\"$(XKB_BASE)\" $(X11_CFLAGS) -$(foreach XKB_UNIT, $(XKB_UNITS), $(eval $(XKB_UNIT)-CFLAGS = $(X11_CFLAGS))) -compose-CFLAGS += -DDATADIR=\"$(datadir)\" -pc_kbd-LDLIBS = $(X11_LIBS) -install: $(DESTDIR)$(XKB_BASE) $(addprefix $(DESTDIR)$(XKB_BASE)/, $(XKB_DATA_FILES)) - -$(DESTDIR)$(XKB_BASE): - @$(MKINSTALLDIRS) $@ - -$(DESTDIR)$(XKB_BASE)/%: xkb/xkb-data/% - $(INSTALL_DATA) $< $@ - -kstoucs.o: xkb/kstoucs_map.c -kstoucs_pic.o: xkb/kstoucs_map.c -xkb/kstoucs_map.c: $(X11_KEYSYMDEF_H) $(srcdir)/xkb/kstoucs_map.sh - mkdir -p xkb ; \ - SED=$(SED) \ - AWK=$(AWK) \ - sh $(srcdir)/xkb/kstoucs_map.sh \ - < $< \ - > map.tmp && \ - mv map.tmp $@ +pc-kbd-CFLAGS = -DXKB_SUPPORT $(XKBCOMMON_CFLAGS) +$(foreach XKB_UNIT, $(XKB_UNITS), $(eval $(XKB_UNIT)-CFLAGS = $(XKBCOMMON_CFLAGS))) +pc_kbd-LDLIBS = $(XKBCOMMON_LIBS) endif |