diff options
author | Teddy Wing | 2018-11-15 16:50:26 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-15 17:11:02 +0100 |
commit | 63b6ebfd813e26fecb444ccc94ba4a1710ad2829 (patch) | |
tree | ab57d64b1eaa0a6b587cdd935f1529a471b8eba4 | |
parent | e12f656eb9b692c11c0704421c51c59d7052c121 (diff) | |
download | DomeKey-63b6ebfd813e26fecb444ccc94ba4a1710ad2829.tar.bz2 |
Makefile: Add target to archive binary & man pages
Builds a tar archive of the executable and man pages with the current
software version in the name. The version is extracted from the `main.m`
file.
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -3,6 +3,7 @@ SOURCE_FILES := $(shell find DomeKey lib \ -name '*.h' \ -or -name '*.m' \ -or -name '*.c') +VERSION := $(shell sed -n '/VERSION/ s/^.*"\([[:digit:]\.]*\)".*$$/\1/p' DomeKey/main.m) RUST_DIR := lib/dome-key-map RUST_LOCAL_LIB := target/debug/libdome_key_map.a @@ -122,3 +123,12 @@ dist/dome-key.1: doc/dome-key.1 dist dist/dome-key-mappings.7: doc/dome-key-mappings.7 dist cp $< $@ + + +# Packaging + +.PHONY: tar +tar: dome-key_$(VERSION).tar.bz2 + +dome-key_$(VERSION).tar.bz2: dist-all + tar cjv -s /dist/dome-key_$(VERSION)/ -f $@ dist |