-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.19 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
include .rc.make
subdirs := src/ src/Examples/ src/Libraries/ src/Selective/ src/Selective/Libraries/ src/Selective/Examples/
agda-objects := $(wildcard $(subdirs:%=%*.agdai))
executables := $(wildcard $(subdirs:%=%*.exe))
malonzo := $(wildcard $(subdirs:%=%MAlonzo/))
.PHONY: latex latex-clean main generated-main clean
latex:
$(MAKE) -f latex.make all
latex-clean:
$(MAKE) -f latex.make clean
main:
stack exec agda -- -c src/Examples/Main.agda
generated-main:
sed 's/__ENTRY__/$(ENTRY)/' src/Examples/Main-template.agda > src/Examples/Main-generated.agda
stack exec agda -- -c src/Examples/Main-generated.agda
selective-generated-main:
sed 's/__ENTRY__/$(ENTRY)/' src/Selective/Examples/Main-template.agda > src/Selective/Examples/Main-generated.agda
stack exec agda -- -c src/Selective/Examples/Main-generated.agda
test-that-all-compiles:
$(MAKE) latex-clean
$(MAKE) latex
stack exec agda -- --no-main -c src/Selective/Examples/Main-generated.agda
stack exec agda -- --no-main -c src/Examples/Main-generated.agda
clean:
ifneq ($(strip $(agda-objects)),)
rm $(agda-objects)
endif
ifneq ($(strip $(executables)),)
rm $(executables)
endif
ifneq ($(strip $(malonzo)),)
rm -rf $(malonzo)
endif