xS: parse project version from CMakeLists.txt

This commit is contained in:
2022-09-27 23:39:53 +02:00
parent 7c74e6615d
commit 4d99690b89
5 changed files with 25 additions and 11 deletions

View File

@@ -2,11 +2,15 @@
.SUFFIXES:
AWK = env LC_ALL=C awk
outputs = xS xS-replies.go
outputs = xS xS-version.go xS-replies.go
all: $(outputs)
xS: xS.go xS-replies.go
xS: xS.go xS-version.go xS-replies.go
go build -o $@
xS-version.go: ../liberty/tools/cmake-parser.awk \
xS-gen-version.awk ../CMakeLists.txt
$(AWK) -f ../liberty/tools/cmake-parser.awk \
-f xS-gen-version.awk ../CMakeLists.txt > $@
xS-replies.go: xS-gen-replies.awk xS-replies
$(AWK) -f xS-gen-replies.awk xS-replies > $@
clean: