aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/discrete/Makefile
diff options
context:
space:
mode:
authorCyril Cohen2015-04-03 17:45:38 +0200
committerCyril Cohen2015-04-03 17:45:38 +0200
commitabe2354abf63ad98dbe7e54a34e59e20b38d3d55 (patch)
tree9e95c4a49252a2c985c537fcfef7992fc262f45d /mathcomp/discrete/Makefile
parent9fa572c64085bc020edee574a694fe0805fefdfa (diff)
Makefile, testing for v8.5 and uncommenting stuff
This is a temporary solution, but there is a better one : one could patch ssreflect.ml4 plugin for v8.4 to interpret From ... Require Import ... as a simple Require Import.
Diffstat (limited to 'mathcomp/discrete/Makefile')
-rw-r--r--mathcomp/discrete/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/mathcomp/discrete/Makefile b/mathcomp/discrete/Makefile
index d693257..ead5950 100644
--- a/mathcomp/discrete/Makefile
+++ b/mathcomp/discrete/Makefile
@@ -5,12 +5,19 @@ COQBIN=$(dir $(shell which coqtop))/
endif
+VERSION_Coq = $(shell $(COQBIN)/coqtop -v | head -1 | sed 's/.*version \([0-9]\.[0-9]\)[^ ]* .*/v\1/')
+
+ifeq "$(VERSION_Coq)" ""
+$(error no version number found for coq)
+endif
+
OLD_MAKEFLAGS:=$(MAKEFLAGS)
MAKEFLAGS+=-B
.DEFAULT_GOAL := all
%:
+ sed -i -e "s/^(\*$(VERSION_Coq) *\(.*\) *\*)/\1/" *.v
$(H)[ -e Makefile.coq ] || $(COQBIN)/coq_makefile -f Make -o Makefile.coq
$(H)MAKEFLAGS=$(OLD_MAKEFLAGS) $(MAKE) --no-print-directory \
-f Makefile.coq $*