diff options
Diffstat (limited to 'Makefile')
-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) |