aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-08-06 00:36:57 +0200
committerTeddy Wing2020-08-06 00:36:57 +0200
commit2ff8521aaaa6a1830287cb10337c944e7d7556ff (patch)
tree8feadc07ec0f94da77f6d8501b45184bab90eea2
parenta230e2acf3323461c95abd1bac09c6a00a9f3fb3 (diff)
downloadgit-suggestion-2ff8521aaaa6a1830287cb10337c944e7d7556ff.tar.bz2
Makefile: Package `dist/` into a bundled archive for release
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0414e3a..a0f8c73 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,9 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
+VERSION := $(shell fgrep 'const VERSION' src/lib.rs | awk -F '"' '{ print $$2 }')
+TOOLCHAIN := $(shell fgrep default_host_triple $(HOME)/.rustup/settings.toml | awk -F '"' '{ print $$2 }')
+
SOURCES := $(shell find . -name '*.rs')
MAN_PAGES := $(patsubst doc/%.1.txt,doc/%.1,$(wildcard doc/*.1.txt))
@@ -55,3 +58,10 @@ $(DIST_PRODUCTS): $(DIST)/bin $(RELEASE_PRODUCTS)
$(DIST_MAN_PAGES): $(DIST)/share/man/man1 $(MAN_PAGES)
cp $(MAN_PAGES) $<
+
+
+.PHONY: pkg
+pkg: git-suggestion_$(VERSION)_$(TOOLCHAIN).tar.bz2
+
+git-suggestion_$(VERSION)_$(TOOLCHAIN).tar.bz2: dist
+ tar cjv -s /dist/git-suggestion_$(VERSION)_$(TOOLCHAIN)/ -f $@ dist