-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (41 loc) · 1.34 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
PROJECT = guile-e-series
TOPDIR = .
LOAD_PATH = $(TOPDIR)/scheme
TEST_PATH = $(TOPDIR)/tests
GUILE_BINARY ?= guile
GUILE_CALL = $(GUILE_BINARY) -L $(LOAD_PATH) -C $(LOAD_PATH) --no-auto-compile
GUILD_BINARY ?= guild
CFLAGS = -Wunsupported-warning -Wunused-variable # -Wunused-toplevel
CFLAGS += -Wunbound-variable -Warity-mismatch -Wduplicate-case-datum
CFLAGS += -Wbad-case-datum -Wformat -L$(LOAD_PATH)
COMPILE = $(GUILD_BINARY) compile $(CFLAGS)
TESTGUILE = ./tools/run-single-test
PROVE = tap-harness -e '$(TESTGUILE)'
INSTALL = $(GUILE_BINARY) --no-auto-compile ./tools/install
DESTDIR =
PREFIX = /usr/local
DOCDIR = $(PREFIX)/share/doc/$(PROJECT)
MODULES = scheme/e-series.scm
MODULES += scheme/e-series/adjacency.scm
MODULES += scheme/e-series/exact.scm
MODULES += scheme/e-series/utilities.scm
MODULES += scheme/e-series/combine.scm
MODULES += scheme/e-series/tables.scm
MODULES += scheme/e-series/pretty-print.scm
MODULES += scheme/e-series/predicates.scm
OBJECTS = ${MODULES:.scm=.go}
TESTS = $(TEST_PATH)/*-scm.t
.SUFFIXES: .scm .go
all: $(OBJECTS)
.scm.go:
$(COMPILE) -o $@ $<
test:
$(PROVE) $(TESTS)
test-verbose:
$(PROVE) --verbose $(TESTS)
install: all
$(INSTALL) DESTDIR="$(DESTDIR)" DOCDIR="$(DOCDIR)" PREFIX="$(PREFIX)"
clean:
find . -name "*.go" -exec rm -f '{}' +
find . -name "*~" -exec rm -f '{}' +
.PHONY: all clean install test