Generate a version.h file

Related: OS#6626
Change-Id: Ia894a9d9a20e343755d8060822d33b8a1c59b4db
This commit is contained in:
Oliver Smith
2025-06-23 16:00:59 +02:00
parent c38ad746f2
commit d0ad985eb0
3 changed files with 28 additions and 1 deletions

View File

@@ -1,3 +1,12 @@
osmocom/simtrace2/version.h: osmocom/simtrace2/version.h.tpl
$(AM_V_GEN)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)sed \
-e "s/{{VERSION}}/$$(echo '@VERSION@' | cut -d. -f1-3)/g" \
-e "s/{{VERSION_MAJOR}}/$$(echo '@VERSION@' | cut -d. -f1)/g" \
-e "s/{{VERSION_MINOR}}/$$(echo '@VERSION@' | cut -d. -f2)/g" \
-e "s/{{VERSION_PATCH}}/$$(echo '@VERSION@' | cut -d. -f3)/g" \
$< > $@
nobase_include_HEADERS = \
osmocom/simtrace2/apdu_dispatch.h \
osmocom/simtrace2/simtrace2_api.h \
@@ -5,4 +14,5 @@ nobase_include_HEADERS = \
osmocom/simtrace2/simtrace_prot.h \
osmocom/simtrace2/usb_util.h \
osmocom/simtrace2/gsmtap.h \
osmocom/simtrace2/version.h \
$(NULL)