diff options
author | Arun Isaac | 2022-01-05 15:54:23 +0530 |
---|---|---|
committer | Arun Isaac | 2022-01-05 16:24:22 +0530 |
commit | 2bb2d8f7432bb8dd01dbb6f6bdb6ebf7d4e83447 (patch) | |
tree | b1995c9dfcc5a9a2ff4d8e4a4fd01b5d5a8d2a5d /Makefile | |
parent | b85b48cf86d91ee0ff8ad6ea1aafcc7e79532049 (diff) | |
download | kolam-2bb2d8f7432bb8dd01dbb6f6bdb6ebf7d4e83447.tar.gz kolam-2bb2d8f7432bb8dd01dbb6f6bdb6ebf7d4e83447.tar.lz kolam-2bb2d8f7432bb8dd01dbb6f6bdb6ebf7d4e83447.zip |
Makefile: Add dist and distcheck targets.
* Makefile (GIT, GPG, LZIP, distribute_files, dist_archive): New
variables.
(.PHONY): Add dist and distcheck.
(dist, $(dist_archive), distcheck): New targets.
(%.asc): New pattern rule.
(clean): Clean $(dist_archive) and $(dist_archive).asc.
* build-aux/distcheck.scm: New file.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -21,12 +21,18 @@ include Makefile.include GUILE = guile GUILD = guild +GIT = git +GPG = gpg +LZIP = lzip EMACS = emacs top_level_module_dir = $(project) sources = $(wildcard $(top_level_module_dir)/*.scm) objects = $(sources:.scm=.go) tests = $(wildcard tests/*.scm) +distribute_files = $(sources) $(tests) \ + COPYING NEWS.org README.org \ + guix.scm Makefile configure configure.scm scmdir = $(datarootdir)/guile/site/$(guile_effective_version)/$(top_level_module_dir) godir = $(libdir)/guile/$(guile_effective_version)/site-ccache/$(top_level_module_dir) @@ -36,10 +42,24 @@ all: $(objects) %.go: %.scm $(GUILD) compile -L . -o $@ $< -.PHONY: check install clean +.PHONY: check install clean dist distcheck check: $(tests) $(GUILE) -L . $^ +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 $< + +distcheck: $(dist_archive) + $(GUILE) build-aux/distcheck.scm $< + install: $(sources) $(objects) install -D $(sources) --target-directory $(scmdir) install -D $(objects) --target-directory $(godir) @@ -50,4 +70,4 @@ website/index.html: README.org build-aux/build-home-page.el $(EMACS) -Q --batch --load build-aux/build-home-page.el --funcall build-website clean: - rm -f $(objects) Makefile.include website/index.html + rm -f $(objects) $(dist_archive) $(dist_archive).asc Makefile.include website/index.html |