From 8d4f4adf80c7fdaa8021b283526ab1592ee13600 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Fri, 10 Jun 2016 15:01:26 -0400 Subject: Add coqprime that works with 8.5, bundle bedrock This simplifes the build process, and also allows us to try to build with 8.5. We autodetect the version of Coq in the Makefile to decide which version of coqprime to build. --- Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 890d2384e..04df08ae3 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,32 @@ MOD_NAME := Crypto SRC_DIR := src -.PHONY: coq clean install coqprime update-_CoqProject +.PHONY: coq clean install coqprime-8.4 coqprime-8.5 coqprime update-_CoqProject .DEFAULT_GOAL := coq SORT_COQPROJECT = sed 's,[^/]*/,~&,g' | env LC_COLLATE=C sort | sed 's,~,,g' update-_CoqProject:: - (echo '-R $(SRC_DIR) $(MOD_NAME)'; (git ls-files 'src/*.v' | $(SORT_COQPROJECT))) > _CoqProject + (echo '-R $(SRC_DIR) $(MOD_NAME)'; echo '-R Bedrock Bedrock'; (git ls-files 'src/*.v' 'Bedrock/*.v' | $(SORT_COQPROJECT))) > _CoqProject coq: coqprime Makefile.coq $(MAKE) -f Makefile.coq -coqprime: +COQ_VERSION_PREFIX = The Coq Proof Assistant, version +COQ_VERSION := $(firstword $(subst $(COQ_VERSION_PREFIX),,$(shell $(COQBIN)coqc --version 2>/dev/null))) + +ifneq ($(filter 8.5%,$(COQ_VERSION)),) # 8.5 +coqprime: coqprime-8.5 +else +coqprime: coqprime-8.4 +endif + +coqprime-8.4: $(MAKE) -C coqprime +coqprime-8.5: + $(MAKE) -C coqprime-8.5 + Makefile.coq: Makefile _CoqProject coq_makefile -f _CoqProject -o Makefile.coq -- cgit v1.2.3