aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libosmo-gtlv/Makefile.am
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-12 02:58:02 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2022-06-16 13:04:33 +0200
commite011b04c6b2e31bdc46320e5d8a4f48715681f15 (patch)
tree4e4f9a4ad06ca68996cbb3dd899081d75979b713 /tests/libosmo-gtlv/Makefile.am
parentf842c8c8d0d809b298668c9f547e6df837532fce (diff)
libosmo-gtlv: add C code generator for IE structs and arrays
Defining a protocol of message types with lists of IEs bears a lot of repetitive, copy-paste-error-prone writing out of data structures. Add a third layer to libosmo-gtlv, which allows helpful code generation. By non-repetitive data structures that briefly describe the protocol's messages and IEs, generate possibly repetitive IE list arrays and decoded-struct definitions automatically, avoiding grunt work errors. I tried C macros for this at first, but it became too convoluted. Generating C code that can be read and grepped makes things easier. A usage example is found in tests/libosmo-gtlv/test_gtlv_gen/. Related: SYS#5599 Change-Id: Ifb3ea54d2797ce060b95834aa117725ec2d6c4cf
Diffstat (limited to 'tests/libosmo-gtlv/Makefile.am')
-rw-r--r--tests/libosmo-gtlv/Makefile.am5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libosmo-gtlv/Makefile.am b/tests/libosmo-gtlv/Makefile.am
index 6d85334..392a73e 100644
--- a/tests/libosmo-gtlv/Makefile.am
+++ b/tests/libosmo-gtlv/Makefile.am
@@ -1,3 +1,7 @@
+SUBDIRS = \
+ test_gtlv_gen \
+ $(NULL)
+
AM_CPPFLAGS = \
$(all_includes) \
-I$(top_srcdir)/include \
@@ -40,3 +44,4 @@ gtlv_dec_enc_test_LDADD = \
update_exp:
$(builddir)/gtlv_test >$(srcdir)/gtlv_test.ok
$(builddir)/gtlv_dec_enc_test >$(srcdir)/gtlv_dec_enc_test.ok
+ $(MAKE) -C test_gtlv_gen update_exp