-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
62 lines (40 loc) · 1.25 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
57
58
59
60
61
62
## HTML Output ############################################################
htmldir=html
# htmldir=$(HOME)/popl17/html
# htmldir=/tmp/logrel-mltt/html
# Agda-2.5.3 needed to generate the links we use in the paper
# Agda-2.5.4 ok from 2018-02-19
# try latest Agda
agda=time agda +RTS -s -RTS -v profile:7
main=Logrel-MLTT.agda
.PHONY : clean pack check agda-check html loc agda-loc agda-woc
html :
$(agda) --html --html-dir=$(htmldir) $(main)
## Type Check Code ########################################################
check : agda-check
# Type check the code
agda-check:
$(agda) $(main)
pack: clean
mkdir code
cp -r Definition Tools $(main) README.agda Makefile code/
$(agda) --html $(main)
zip -r formalization code html
clean:
find . -name "*.agdai" -type f -delete
rm -rf code html formalization.zip
## Lines of Code ##########################################################
agdalocfiles=$(shell find . \( \( -name '*.agda' \) ! -name '.*' \) )
# Agda files in this project
loc : agda-loc
nc : agda-loc-nc
# Sum all agda files
agda-loc :
@wc $(agdalocfiles)
# Delete comments (sed) and empty lines (grep .) first
agda-loc-nc :
@sed -e '/--.*/d' $(agdalocfiles) | grep . | wc
# Find the widest column:
agda-woc :
@wc -L $(agdalocfiles)
# EOF