aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect/Makefile
blob: c588920d9d059bf9cd29b1c7cff0c9c33886d11e (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 Makefile.detect-coq-version
# this defined coqmakefile
include 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,.)
	# 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