aboutsummaryrefslogtreecommitdiff
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
parentAdd new tests. (diff)
downloadcalp-ef802b4fe7458cdb75c60c846db162fb39028d1e.tar.gz
calp-ef802b4fe7458cdb75c60c846db162fb39028d1e.tar.xz
Cleanup makefile.
-rw-r--r--Makefile32
-rw-r--r--[-rwxr-xr-x]env0
-rw-r--r--static/Makefile4
3 files changed, 19 insertions, 17 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 $@ $<
diff --git a/env b/env
index cc4fc222..cc4fc222 100755..100644
--- a/env
+++ b/env
diff --git a/static/Makefile b/static/Makefile
index b85422a3..e567c350 100644
--- a/static/Makefile
+++ b/static/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all clean watch
+.PHONY: all install clean watch
TARGETS := style.css smallcal.css script.out.js
WATCH=
@@ -29,6 +29,8 @@ watch:
rename-session "calp watch" \; \
select-layout even-vertical
+install: all
+ install -m644 -t $(DESTDIR)/usr/share/calp/www/ $(TARGETS)
clean:
rm $(TARGETS)