diff options
author | Arun Isaac | 2023-01-11 23:29:29 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-16 00:36:09 +0000 |
commit | 595fe32e7680e75bca74addff27471138cfeb139 (patch) | |
tree | 131f95b54044363c88768dc9409b04a86842acd3 | |
parent | 5cc34d6be3daada501ff952fc9edf1ac04d9c24a (diff) | |
download | guile-email-595fe32e7680e75bca74addff27471138cfeb139.tar.gz guile-email-595fe32e7680e75bca74addff27471138cfeb139.tar.lz guile-email-595fe32e7680e75bca74addff27471138cfeb139.zip |
Makefile: Add release tarball generation rules.
* Makefile (version, GIT, GPG, LZIP, distribute_files, dist_archive):
New variables.
(dist, $(dist_archive), %.asc): New rules.
(.PHONY): Add dist.
-rw-r--r-- | Makefile | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -18,12 +18,16 @@ # <http://www.gnu.org/licenses/>. project = guile-email +version = $(subst v,,$(shell git describe --abbrev=0)) # FIXME: Do not hardcode the effective version. guile_effective_version = 3.0 EMACS ?= emacs +GIT ?= git +GPG ?= gpg GUILD ?= guild GUILE ?= guile +LZIP ?= lzip MAKEINFO ?= makeinfo prefix ?= /usr/local @@ -39,11 +43,15 @@ tests = $(wildcard tests/*.scm) doc_texi = doc/$(project).texi doc_html = $(doc_texi:.texi=.html) doc_info = $(doc_texi:.texi=.info) +distribute_files = $(sources) tests $(doc_texi) \ + build-aux/test-driver.scm \ + COPYING NEWS README.org \ + guix.scm Makefile scmdir = $(datarootdir)/guile/site/$(guile_effective_version) godir = $(libdir)/guile/$(guile_effective_version)/site-ccache -.PHONY: all check install clean +.PHONY: all check install clean dist all: $(objects) @@ -70,6 +78,17 @@ website/manual/dev/en: $(doc_html) check: $(tests) $(GUILE) --no-auto-compile -L . build-aux/test-driver.scm $^ +dist_archive = $(project)-$(version).tar.lz + +dist: $(dist_archive) $(dist_archive).asc + +$(dist_archive): .git/refs/heads/master + $(GIT) archive --prefix $(basename $(basename $@))/ --format=tar master $(distribute_files) \ + | $(LZIP) --force --output $@ + +%.asc: % + $(GPG) --detach-sign --armor $< + install: $(doc_info) mkdir -p $(scmdir) $(godir) cp --parents -vr $(sources) $(scmdir) |