aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/Makefile
blob: 07f1869b0f36efe75a23f640dbd3cf6835222bb3 (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
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

COQDEP=$(COQBIN)coqdep

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)[ -e Makefile.coq ] || $(call coqmakefile,ssreflect)
	$(H)MAKEFLAGS="$(OLD_MAKEFLAGS)" $(MAKE) --no-print-directory \
		-f Makefile.coq clean
	$(H)rm -f Makefile.coq