From 2ff8521aaaa6a1830287cb10337c944e7d7556ff Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 6 Aug 2020 00:36:57 +0200 Subject: Makefile: Package `dist/` into a bundled archive for release --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 . +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 -- cgit v1.2.3