aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/ssreflect
diff options
context:
space:
mode:
authorCyril Cohen2018-08-01 13:14:39 +0200
committerCyril Cohen2018-08-01 13:26:03 +0200
commitb83fe0ed8a8e7258c8cf55178dd619b743c8342e (patch)
treed450bf6c7e401133974441682e8303da325809df /mathcomp/ssreflect
parent247ec435a6dd1c17a42b75ae46763a9062f1f291 (diff)
simplified, cleaned and documented Makefile.common
Diffstat (limited to 'mathcomp/ssreflect')
-rw-r--r--mathcomp/ssreflect/Makefile3
-rw-r--r--mathcomp/ssreflect/Makefile.detect-coq-version18
2 files changed, 9 insertions, 12 deletions
diff --git a/mathcomp/ssreflect/Makefile b/mathcomp/ssreflect/Makefile
index c3092fc..76b8c2c 100644
--- a/mathcomp/ssreflect/Makefile
+++ b/mathcomp/ssreflect/Makefile
@@ -8,10 +8,9 @@ COQMAKEOPTIONS=--no-print-directory
include ../Makefile.common
# --------------------------------------------------------------------
-# this sets variable V (coq version) and MLLIBEXTRA
+# this sets variables COQVERSION and MLLIBEXTRA
# assuming PLUGIN is set to the directory which contains the plugins
PLUGIN=../../plugin/
SSR=.
include Makefile.detect-coq-version
-
COQMAKEFILEOPTIONS=$(MLLIBEXTRA)
diff --git a/mathcomp/ssreflect/Makefile.detect-coq-version b/mathcomp/ssreflect/Makefile.detect-coq-version
index 0f7d9de..c6a981a 100644
--- a/mathcomp/ssreflect/Makefile.detect-coq-version
+++ b/mathcomp/ssreflect/Makefile.detect-coq-version
@@ -2,19 +2,17 @@ BRANCH_coq:= $(shell $(COQBIN)coqtop -v | head -1 | grep -E '(trunk|master)' \
| wc -l | sed 's/ *//g')
ifneq "$(BRANCH_coq)" "0"
-BRANCH_coq:= master
+COQVERSION:= master
else
-BRANCH_coq:= $(shell $(COQBIN)coqtop -v | head -1 \
+COQVERSION:= $(shell $(COQBIN)coqtop -v | head -1 \
| sed 's/.*version \([0-9]\.[0-9]\)[^ ]* .*/\1/')
endif
-V:=$(BRANCH_coq)
-
MLLIBEXTRA:=$(shell \
- if [ $(V) = "8.6" ];\
- then cp $(PLUGIN)/v$(V)/ssreflect_plugin.mlpack .;\
- cp $(PLUGIN)/v$(V)/ssreflect.ml4 .;\
- cp $(PLUGIN)/v$(V)/ssrbool.v $(SSR)/;\
- cp $(PLUGIN)/v$(V)/ssrfun.v $(SSR)/;\
- cp $(PLUGIN)/v$(V)/ssreflect.v $(SSR)/;\
+ if [ $(COQVERSION) = "8.6" ];\
+ then cp $(PLUGIN)/v$(COQVERSION)/ssreflect_plugin.mlpack .;\
+ cp $(PLUGIN)/v$(COQVERSION)/ssreflect.ml4 .;\
+ cp $(PLUGIN)/v$(COQVERSION)/ssrbool.v $(SSR)/;\
+ cp $(PLUGIN)/v$(COQVERSION)/ssrfun.v $(SSR)/;\
+ cp $(PLUGIN)/v$(COQVERSION)/ssreflect.v $(SSR)/;\
echo "ssreflect_plugin.mlpack ssreflect.ml4"; fi)