aboutsummaryrefslogtreecommitdiff
path: root/xS/Makefile
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-03 08:53:20 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-04 23:26:05 +0200
commit6f596f1dcbee812dd7feff1bc6664cdc7944f2a3 (patch)
tree75b4ed0437387bcab49d39aba0aa53de38aa25f1 /xS/Makefile
parentabcff46dc49168125b51a63d10db3eb284d9bcc0 (diff)
downloadxK-6f596f1dcbee812dd7feff1bc6664cdc7944f2a3.tar.gz
xK-6f596f1dcbee812dd7feff1bc6664cdc7944f2a3.tar.xz
xK-6f596f1dcbee812dd7feff1bc6664cdc7944f2a3.zip
Move project version to file, add xS manual page
So far Go applications remain independent to handle Nix's inability to easily combine them with the CMake part. There is also no "install" target, because any packagers will want to adjust installation paths manually, and there is no configure step.
Diffstat (limited to 'xS/Makefile')
-rw-r--r--xS/Makefile13
1 files changed, 6 insertions, 7 deletions
diff --git a/xS/Makefile b/xS/Makefile
index f0f662d..92716ac 100644
--- a/xS/Makefile
+++ b/xS/Makefile
@@ -2,16 +2,15 @@
.SUFFIXES:
AWK = env LC_ALL=C awk
-outputs = xS xS-version.go xS-replies.go
+outputs = xS xS-replies.go xS.1
all: $(outputs)
-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: xS.go ../xK-version xS-replies.go
+ go build -ldflags "-X 'main.projectVersion=$$(cat ../xK-version)'" -o $@
xS-replies.go: xS-gen-replies.awk xS-replies
$(AWK) -f xS-gen-replies.awk xS-replies > $@
+xS.1: ../xK-version ../liberty/tools/asciiman.awk xS.adoc
+ env "asciidoc-release-version=$$(cat ../xK-version)" \
+ $(AWK) -f ../liberty/tools/asciiman.awk xS.adoc > $@
clean:
rm -f $(outputs)