aboutsummaryrefslogtreecommitdiff
path: root/.make/coq.mk
blob: b05c7e59d702c20af8505445b24c176c5cebdadc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# © 2012–2015 the Massachusetts Institute of Technology
# @author bbaren + rsloan

COQC = coqc
COQDEP = coqdep

COMPILE.v = $(COQC) -q $(COQLIBS)

.PHONY: check_fiat

check_fiat:
	@perl -e \
		'if(! -d "./fiat") { print("you need to link fiat to ./fiat\n"); exit(1) }'

%.vo %.glob: check_fiat %.v
	$(COMPILE.v) $*

%.v.d: check_fiat %.v
	@$(COQDEP) -I . $(COQLIBS) "$<" >"$@" \
	  || (RV=$$?; rm -f "$@"; exit $${RV})

define coq-generated
$1.vo $1.v.d $1.glob
endef