forked from mr-ohman/logrel-mltt
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
58 lines (36 loc) · 1.15 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
## HTML Output ############################################################
htmldir=html
# htmldir=/tmp/logrel-mltt/html
# Agda-2.5.3 needed to generate the links we use in the paper
agda=agda
.PHONY : clean pack check agda-check html loc agda-loc agda-woc
html :
$(agda) --html --html-dir=$(htmldir) Everything.agda
## Type Check Code ########################################################
check : agda-check
# Type check the code
agda-check:
$(agda) Everything.agda
pack: clean
mkdir code
cp -r Definition Tools Everything.agda README.agda Makefile code/
$(agda) --html Everything.agda
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