From 737f79e968a4832d15f6eb93b5bf24c0267fbecb Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Wed, 8 Apr 2015 13:38:41 +0200 Subject: makefiles that are version dependent --- mathcomp/solvable/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mathcomp/solvable') diff --git a/mathcomp/solvable/Makefile b/mathcomp/solvable/Makefile index d693257..ead5950 100644 --- a/mathcomp/solvable/Makefile +++ b/mathcomp/solvable/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 $* -- cgit v1.2.3