aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mathcomp/Makefile')
-rw-r--r--mathcomp/Makefile21
1 files changed, 5 insertions, 16 deletions
diff --git a/mathcomp/Makefile b/mathcomp/Makefile
index 880977c..120c127 100644
--- a/mathcomp/Makefile
+++ b/mathcomp/Makefile
@@ -4,17 +4,15 @@ ifeq "$(COQBIN)" ""
COQBIN=$(dir $(shell which coqtop))/
endif
-ifeq "$(shell $(COQBIN)/coqtop -v | head -1 | grep trunk | wc -l | sed 's/ *//g')" "1"
-V=trunk
-else
-V=$(shell $(COQBIN)/coqtop -v | head -1 | \
- sed 's/.*version \([0-9]\.[0-9]\)[^ ]* .*/v\1/')
-endif
+# this sets variable V
+include ssreflect/Makefile.detect-coq-version
+# this defined coqmakefile
+include Makefile.coq-makefile
ifeq "$V" "v8.4"
COQDEP=../etc/utils/ssrcoqdep
else
-COQDEP=$(COQBIN)/coqdep
+COQDEP=$(COQBIN)coqdep
endif
OLD_MAKEFLAGS:=$(MAKEFLAGS)
@@ -29,15 +27,6 @@ MAKEFLAGS+=-B
-f Makefile.coq $* \
COQDEP='$(COQDEP) -exclude-dir plugin -c'
-define coqmakefile
- (echo "Generating Makefile.coq for Coq $(V) with COQBIN=$(COQBIN)";\
- ln -sf ssreflect/plugin/$(V)/ssreflect.mllib .;\
- ln -sf ssreflect/plugin/$(V)/ssrmatching.mli .;\
- ln -sf ssreflect/plugin/$(V)/ssrmatching.ml4 .;\
- ln -sf ssreflect/plugin/$(V)/ssreflect.ml4 .;\
- $(COQBIN)/coq_makefile -f Make -o Makefile.coq)
-endef
-
clean:
$(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
-f Makefile.coq clean