Auto-generate defintions from defs.txt

But it doesn't yet handle names with non-C-indentifier characters in
them.
This commit is contained in:
Simon Forman
2023-02-05 13:50:16 -08:00
parent 291b6caa75
commit 8bda5d511a
7 changed files with 98 additions and 60 deletions
+5 -2
View File
@@ -18,13 +18,16 @@ joy: ${OBJS} $(STATIC_GCLIB)
joy.o: joy.h
definitions.c: defs.txt convert_defs.py
python convert_defs.py > definitions.c
python convert_defs.py > $@
definitions.h: defs.txt convert_defs.py
python convert_defs.py --header > definitions.h
python convert_defs.py --header > $@
definitions.o: definitions.h
KEYWORDS.txt: KEYWORDS.in defs.txt convert_defs.py
python convert_defs.py --keywords > $@
# Gperf doesn't add anything to '{""}' unused entries in the wordlist.
# This causes "warning: missing field 'func' initializer [-Wmissing-field-initializers]"
# which is promoted to an error and holds up the show.