diff options
author | Jason Gross <jgross@mit.edu> | 2017-11-17 16:50:18 -0500 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-11-17 16:50:18 -0500 |
commit | 4bc5982cc04e19c034cbd8063783538157873b32 (patch) | |
tree | e60d86490beb5d2c6ea87d15dd9e9ea21c235985 | |
parent | 02479d3444fa05891bf459eba72be97760edb9c9 (diff) |
Add a regenerate-curves target
It's currently a bit ad-hoc, and relies on the presence of git to add
things to _CoqProject, but it's a bit better than manually invoking the
commands. More refinements to come, hopefully.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 14 | ||||
-rwxr-xr-x | regenerate-curves.sh | 11 |
3 files changed, 21 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore index dddbc9e73..6fe714950 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ nra.cache .nlia.cache .nia.cache .nra.cache +/remake_curves.log # compilation outputs etc/tscfreq @@ -19,12 +19,13 @@ INSTALLDEFAULTROOT := Crypto specific non-specific lite only-heavy printlite \ curves-proofs no-curves-proofs no-curves-proofs-non-specific \ selected-specific selected-specific-display nonautogenerated-specific nonautogenerated-specific-display nonautogenerated-c selected-test selected-bench selected-c \ - test bench c + test bench c \ + regenerate-curves SORT_COQPROJECT = sed 's,[^/]*/,~&,g' | env LC_COLLATE=C sort | sed 's,~,,g' | uniq -FAST_TARGETS += archclean clean cleanall clean-coqprime printenv clean-old update-_CoqProject Makefile.coq -SUPER_FAST_TARGETS += update-_CoqProject Makefile.coq +FAST_TARGETS += archclean clean cleanall clean-coqprime printenv clean-old update-_CoqProject regenerate-curves Makefile.coq +SUPER_FAST_TARGETS += update-_CoqProject Makefile.coq regenerate-curves SLOW := ifneq ($(filter-out $(SUPER_FAST_TARGETS),$(MAKECMDGOALS)),) @@ -57,7 +58,7 @@ update-_CoqProject:: $(VOFILES): | coqprime # add files to this list to prevent them from being built by default -UNMADE_VOFILES := +UNMADE_VOFILES := UNMADE_C_FILES := \ src/Specific/X25519/C64/fesub.c src/Specific/X25519/C64/feadd.c src/Specific/X25519/C64/fecarry.c \ src/Specific/X25519/C64/fesub.h src/Specific/X25519/C64/feadd.h src/Specific/X25519/C64/fecarry.h \ @@ -136,6 +137,9 @@ nonautogenerated-specific-display: $(NONAUTOGENERATED_SPECIFIC_DISPLAY_VO:.vo=.l nonautogenerated-c: $(filter-out $(UNMADE_C_FILES),$(NONAUTOGENERATED_SPECIFIC_DISPLAY_VO:Display.vo=.c) $(NONAUTOGENERATED_SPECIFIC_DISPLAY_VO:Display.vo=.h)) coqprime display: $(DISPLAY_VO:.vo=.log) coqprime +regenerate-curves:: + ./regenerate-curves.sh + printlite:: @echo 'Files Made:' @for i in $(sort $(LITE_VOFILES)); do echo $$i; done @@ -361,7 +365,7 @@ test: $(RUN_TEST_BINARIES) selected-test: $(RUN_SELECTED_TEST_BINARIES) clean:: - rm -f Makefile.coq + rm -f Makefile.coq remake_curves.log cleanall:: clean clean-coqprime diff --git a/regenerate-curves.sh b/regenerate-curves.sh new file mode 100755 index 000000000..c57afff63 --- /dev/null +++ b/regenerate-curves.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -o pipefail +set -ex + +cd "$( dirname "${BASH_SOURCE[0]}" )" + +python3 generate_parameters.py primes.txt +./src/Specific/CurveParameters/remake_curves.sh -f | tee remake_curves.log +grep 'git add ' remake_curves.log | sed s'/git add //g' | tr '"' '\n' | grep -v '^\s*$' | xargs git add +make update-_CoqProject |