aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/Makefile
blob: e05ce8054dbde4953996796de95bfb4733517e88 (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
25
26
27
28
29
30
31
32
33
H=@

ifeq "$(COQBIN)" ""
COQBIN=$(dir $(shell which coqtop))/
endif

# this sets variable V
include ssreflect/Makefile.detect-coq-version
# this defined coqmakefile
include ssreflect/Makefile.coq-makefile

ifeq "$V" "v8.4"
COQDEP=../etc/utils/ssrcoqdep
else
COQDEP=$(COQBIN)coqdep
endif

OLD_MAKEFLAGS:=$(MAKEFLAGS)
MAKEFLAGS+=-B

.DEFAULT_GOAL := all

%:
	$(H)[ -e Makefile.coq ] || $(call coqmakefile,ssreflect)
	# Override COQDEP to find only the "right" copy .ml files
	$(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
		-f Makefile.coq $* \
		COQDEP='$(COQDEP) -exclude-dir plugin -c'

clean:
	$(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
		-f Makefile.coq clean
	$(H)rm -f Makefile.coq