forked from agda/agda-ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (49 loc) · 1.77 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
SHELL=bash
# Profiling verbosity for library-test
PROFVERB=7
# Various paths and commands
TOP=.
# mk/path.mk uses TOP, so include after the definition of TOP.
include ./mk/paths.mk
CABAL_CMD=cabal
# Run in interactive and parallel mode by default
PARALLEL_TESTS = $(shell getconf _NPROCESSORS_ONLN)
AGDA_TESTS_OPTIONS ?=-i -j$(PARALLEL_TESTS)
PHONY : default
default: install-bin
# Install Agda using Stack
.PHONY : stack-install-bin
stack-install-bin :
stack build agda-ocaml:exe:agda-ocaml \
--flag Agda:enable-cluster-counting \
--no-haddock \
--no-library-profiling \
--stack-yaml stack-lts-12.yaml
.PHONY : stack-install-test
stack-install-test :
stack build agda-ocaml:test:agda-ocaml-tests \
--no-run-tests \
--flag Agda:enable-cluster-counting \
--no-haddock \
--no-library-profiling \
--stack-yaml stack-lts-12.yaml
# Copy the artefacts built by Stack as if they were build by Cabal.
.PHONY : stack-copy-artefacts
stack-copy-artefacts : stack-install-bin stack-install-test
mkdir -p $(TOP)/build/
cp -r $(shell stack path --dist-dir)/build $(TOP)
.PHONY : install-bin
install-bin : stack-install-bin stack-install-test stack-copy-artefacts
.PHONY : compiler-test
compiler-test :
@echo "======================================================================"
@echo "========================== Compiler tests ============================"
@echo "======================================================================"
@AGDA_BIN=$(AGDA_BIN) $(AGDA_TESTS_BIN) $(AGDA_TESTS_OPTIONS) --regex-include all/Compiler
debug :
@echo "AGDA_BIN = $(AGDA_BIN)"
@echo "AGDA_TESTS_BIN = $(AGDA_TESTS_BIN)"
@echo "AGDA_TESTS_OPTIONS = $(AGDA_TESTS_OPTIONS)"
@echo "CABAL_CMD = $(CABAL_CMD)"
@echo "PARALLEL_TESTS = $(PARALLEL_TESTS)"