Makefile 1.08 KB
Newer Older
1

2
DKS = $(wildcard *.dk)
3
DKOS = $(DKS:.dk=.dko)
4
DKDEPENDS = $(DKS:.dk=.dk.depend)
5

6
7
DKDEP = dkdep
DKCHECK = dkcheck
8
DKCHECK_OPTIONS =
9
DKCHECK_CONFLUENCE_OPTION = -cc $(shell locate csiho.sh)
10

11
.PHONY:	clean depend
12

13
14
all: $(DKOS)

15
%.dko:
16
	$(DKCHECK) -e $(DKCHECK_CONFLUENCE_OPTION) $(DKCHECK_OPTIONS) $<
17

18
19
# dk_monads and dk_monads_coc use non-linear rules so we deactivate
# confluence checking for those files and activate the relevant options
20
21
22
23
24
dk_monads.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) -nl $<
dk_monads_coc.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) -nl -coc $<

25
26
27
# dk_binary_nat is too hard for the confluence checker
dk_binary_nat.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) $<
28
29
30
31
32
33
34
35
# dk_char, dk_string, dk_builtins depend on it
dk_char.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) $<
dk_string.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) $<
dk_builtins.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) $<

36

37
38
39
# so is dk_int
dk_int.dko:
	$(DKCHECK) -e $(DKCHECK_OPTIONS) $<
40

41

42
# foo.dk.depend lists the modules foo depends on
43
44
%.dk.depend: %.dk
	$(DKDEP) $< > $@
45

46
depend: $(DKDEPENDS)
47
48

clean:
49
	rm -f *.dko *.depend tmp.dk
50

51
-include $(DKDEPENDS)