aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2016-02-05 15:24:42 -0500
committerGravatar Jason Gross <jgross@mit.edu>2016-02-05 15:24:42 -0500
commita47b49b11d17add5ca1ea5e650d2f344219b4f7e (patch)
tree699bff16674a68d1a5dc059bfdbd2f9ca85e95a7 /Makefile
parent1f83ff39458ca80acf3192c938490cf4988b7489 (diff)
Update build process to use COQPATH & _CoqProject
Removed all of the files not built by default; they can be resurrected from git history. _CoqProject is the standard way to list the files in a project and to give information to coq_makefile. COQPATH is the standard way to make use of not-yet-installed libraries that are not part of your project (i.e., you don't want to remove them when you `make clean`, etc.).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 9 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index fc777768f..35cbcde24 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,11 @@
-COQ_ARGS := -R bedrock/Bedrock Bedrock -R coqprime/Tactic Coqprime -R coqprime/N Coqprime -R coqprime/Z Coqprime -R coqprime/List Coqprime -R coqprime/PrimalityTest Coqprime
MOD_NAME := Crypto
SRC_DIR := src
-MODULES := Curves Galois Rep Specific Tactics Util
-VS := $(MODULES:%=src/%/*.v)
+.PHONY: coq clean install coqprime update-_CoqProject
+.DEFAULT_GOAL := coq
-.PHONY: coq clean install coqprime
-.DEFAULT_GOAL: coq
+update-_CoqProject::
+ (echo '-R $(SRC_DIR) $(MOD_NAME)'; git ls-files src/*.v) > _CoqProject
coq: coqprime Makefile.coq
$(MAKE) -f Makefile.coq
@@ -14,14 +13,13 @@ coq: coqprime Makefile.coq
coqprime:
$(MAKE) -C coqprime
-Makefile.coq: Makefile $(VS)
- coq_makefile -R $(SRC_DIR) $(MOD_NAME) $(COQ_ARGS) $(VS) -o Makefile.coq
+Makefile.coq: Makefile _CoqProject
+ coq_makefile -f _CoqProject -o Makefile.coq
clean: Makefile.coq
$(MAKE) -f Makefile.coq clean
rm -f Makefile.coq
-install: coq
- ln -sfL $(shell pwd)/src $(shell coqtop -where)/user-contrib/Crypto
- ln -sfL $(shell pwd)/bedrock/Bedrock $(shell coqtop -where)/user-contrib/Bedrock
-
+install: coq Makefile.coq
+ $(MAKE) -f Makefile.coq install
+ $(MAKE) -C coqprime install