makekeys: Move all of the table generation to Python
This makes it easier to run the Python script manually.master
parent
870913c234
commit
938a2c379b
|
@ -192,8 +192,7 @@ update-keysyms:
|
||||||
-e 's/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/' \
|
-e 's/#define\s*\(\w*\)XK_/#define XKB_KEY_\1/' \
|
||||||
-e '/\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
|
-e '/\(#ifdef\|#ifndef\|#endif\)/d' $(KEYSYMDEFS) >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
|
||||||
echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
|
echo -en '\n\n#endif\n' >> $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h
|
||||||
echo -en '/* This file is autogenerated from Makefile.am; please do not commit directly. */\n\n' > $(top_srcdir)/src/ks_tables.h
|
LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h > $(top_srcdir)/src/ks_tables.h
|
||||||
LC_CTYPE=C python $(top_srcdir)/makekeys.py $(top_srcdir)/xkbcommon/xkbcommon-keysyms.h >> $(top_srcdir)/src/ks_tables.h
|
|
||||||
|
|
||||||
# Run this if you add/remove a new keyword to the xkbcomp scanner,
|
# Run this if you add/remove a new keyword to the xkbcomp scanner,
|
||||||
# or just want to regenerate the gperf file.
|
# or just want to regenerate the gperf file.
|
||||||
|
|
|
@ -6,7 +6,9 @@ pattern = re.compile(r'^#define\s+XKB_KEY_(?P<name>\w+)\s+(?P<value>0x[0-9a-fA-F
|
||||||
matches = [pattern.match(line) for line in open(sys.argv[1])]
|
matches = [pattern.match(line) for line in open(sys.argv[1])]
|
||||||
entries = [(m.group("name"), int(m.group("value"), 16)) for m in matches if m]
|
entries = [(m.group("name"), int(m.group("value"), 16)) for m in matches if m]
|
||||||
|
|
||||||
print('''struct name_keysym {
|
print('''/* This file is autogenerated from Makefile.am; please do not commit directly. */
|
||||||
|
|
||||||
|
struct name_keysym {
|
||||||
const char *name;
|
const char *name;
|
||||||
xkb_keysym_t keysym;
|
xkb_keysym_t keysym;
|
||||||
};\n''')
|
};\n''')
|
||||||
|
|
Loading…
Reference in New Issue