Makefile 852 Bytes
Newer Older
Ralf Jung's avatar
Ralf Jung committed
1 2 3 4 5 6 7
# Determine Coq version
COQ_VERSION=$(shell coqc --version | egrep -o 'version 8.[0-9]' | egrep -o '8.[0-9]')
COQ_MAKEFILE_FLAGS ?=

ifeq ($(COQ_VERSION), 8.6)
	COQ_MAKEFILE_FLAGS += -arg -w -arg -notation-overridden,-redundant-canonical-projection
endif
8

9
%: Makefile.coq phony
10
	+@make -f Makefile.coq $@
11

12
all: Makefile.coq
13
	+@make -f Makefile.coq all
14 15

clean: Makefile.coq
16
	+@make -f Makefile.coq clean
17 18
	rm -f Makefile.coq

19
Makefile.coq: _CoqProject Makefile
Ralf Jung's avatar
Ralf Jung committed
20
	coq_makefile $(COQ_MAKEFILE_FLAGS) -f _CoqProject | sed 's/$$(COQCHK) $$(COQCHKFLAGS) $$(COQLIBS)/$$(COQCHK) $$(COQCHKFLAGS) $$(subst -Q,-R,$$(COQLIBS))/' \
21
	  | sed '/^install:$$/a \\tif [ -d "$$(DSTROOT)"$$(COQLIBINSTALL)/iris/ ]; then find "$$(DSTROOT)"$$(COQLIBINSTALL)/iris/ -name "*.vo" -print -delete; fi' > Makefile.coq
22

23 24 25
_CoqProject: ;

Makefile: ;
26

27 28
phony: ;

29
.PHONY: all clean phony