blob: 00cbc5602e052a247bd6047abccf07db17f4393f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
.PHONY: all clean test
GUILE_SITE_DIR=$(shell guile -c "(display (%site-dir))")
GUILE_CCACHE_DIR=$(shell guile -c "(display (%site-ccache-dir))")
SCM_FILES = $(shell find module/ -type f -name \*.scm)
GO_FILES = $(SCM_FILES:%=obj/%.go)
GUILE_C_FLAGS = -Lmodule \
-Wunused-toplevel \
-Wshadowed-toplevel -Wunbound-variable \
-Wmacro-use-before-definition -Warity-mismatch \
-Wduplicate-case-datum -Wbad-case-datum
all: $(GO_FILES) README
obj/%.scm.go: %.scm
@mkdir -p obj
guild compile $(GUILE_C_FLAGS) -o $@ $<
clean:
-rm -r obj
install:
install -d $(DESTDIR)$(GUILE_SITE_DIR) $(DESTDIR)$(GUILE_CCACHE_DIR)
rsync -a module/ $(DESTDIR)$(GUILE_SITE_DIR)
rsync -a obj/ $(DESTDIR)$(GUILE_CCACHE_DIR)
install -d $(DESTDIR)/usr/share/calp/www
rsync -a static $(DESTDIR)/usr/share/calp/www
# TODO main, tzget
README: README.in
./main text < README.in | sed "s/<<today>>/`date -I`/" > README
test:
tests/run-tests.scm
|