diff options
author | Arun Isaac | 2023-01-27 01:21:31 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-27 01:30:14 +0000 |
commit | bee72777a0f2bd17a7ca3ec17783cfa80aa7b303 (patch) | |
tree | aaa2343064bc9b2e1eb296c1a1c7d6c0d11208a5 /Makefile | |
parent | cf75415265a0d5561728c013f6670e43d314b7cd (diff) | |
download | tissue-bee72777a0f2bd17a7ca3ec17783cfa80aa7b303.tar.gz tissue-bee72777a0f2bd17a7ca3ec17783cfa80aa7b303.tar.lz tissue-bee72777a0f2bd17a7ca3ec17783cfa80aa7b303.zip |
Makefile: Add tarball generation rules.
* Makefile (version, GIT, GPG, LZIP, distribute_files, dist_archive):
New variables.
(.PHONY): Add dist.
(dist, $(dist_archive), %.asc): New targets.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -17,11 +17,15 @@ # along with tissue. If not, see <https://www.gnu.org/licenses/>. project = tissue +version = $(subst v,,$(shell git describe --abbrev=0)) # FIXME: Do not hardcode the effective version. guile_effective_version = 3.0 +GIT ?= git +GPG ?= gpg GUILD ?= guild GUILE ?= guile +LZIP ?= lzip prefix ?= /usr/local exec_prefix ?= $(prefix) @@ -36,11 +40,13 @@ sources = $(wildcard $(top_level_module_dir)/*.scm) \ objects = $(sources:.scm=.go) scripts = $(wildcard bin/*) tests = $(wildcard tests/*) +distribute_files = $(sources) $(scripts) $(tests) \ + COPYING 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) @@ -52,6 +58,17 @@ check: ./pre-inst-env $(GUILE) $$test; \ done +dist_archive = $(project)-$(version).tar.lz + +dist: $(dist_archive) $(dist_archive).asc + +$(dist_archive): .git/refs/heads/main + $(GIT) archive --prefix $(basename $(basename $@))/ --format=tar main $(distribute_files) \ + | $(LZIP) --force --output $@ + +%.asc: % + $(GPG) --detach-sign --armor $< + install: install -D $(scripts) --target-directory $(bindir) for source in $(sources); do \ |