aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-07 20:28:35 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-07 20:29:14 +0100
commitef802b4fe7458cdb75c60c846db162fb39028d1e (patch)
tree4bf9d6dd5480a3e206435fbdcb6b7b038f53455d /Makefile
parentAdd new tests. (diff)
downloadcalp-ef802b4fe7458cdb75c60c846db162fb39028d1e.tar.gz
calp-ef802b4fe7458cdb75c60c846db162fb39028d1e.tar.xz
Cleanup makefile.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 16 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index be77b2c4..bb3b0b6b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
.PHONY: all clean test \
- static coverage \
+ static \
go_files
GUILE := guile
@@ -40,25 +40,25 @@ clean:
install: all
install -d $(DESTDIR)$(GUILE_SITE_DIR) $(DESTDIR)$(GUILE_CCACHE_DIR)
rsync -a module/ $(DESTDIR)$(GUILE_SITE_DIR)
- rsync -a obj/ $(DESTDIR)$(GUILE_CCACHE_DIR)
+ rsync -a obj-$(GUILE_VERSION)/ $(DESTDIR)$(GUILE_CCACHE_DIR)
install -d $(DESTDIR)/usr/share/calp/www
- rsync -a static $(DESTDIR)/usr/share/calp/www
+ $(MAKE) -C static install
install -m 644 -D -t $(DESTDIR)/usr/share/doc/calp README
install -m 755 -D -t $(DESTDIR)/usr/lib/calp/ scripts/tzget
- install -D production-main $(DESTDIR)/usr/bin/calp
+ install -m755 -D production-main $(DESTDIR)/usr/bin/calp
README: README.in
./main text < README.in | sed "s/<<today>>/`date -I`/" > README
-test: go_files
- tests/run-tests.scm
- $(MAKE) coverage
-
-coverage:
- genhtml \
- --show-details \
- --output-directory coverage \
- --prefix $(shell pwd) \
- --no-function-coverage \
- --quiet \
- lcov.info
+lcov.info: $(GO_FILES)
+ env DEBUG=1 tests/run-tests.scm --coverage=$@
+
+test: coverage
+
+GENHTML_FLAGS=--show-details \
+ --prefix $(shell pwd)/module \
+ --no-function-coverage \
+ --quiet
+
+coverage: lcov.info
+ genhtml $(GENHTML_FLAGS) --output-directory $@ $<