Skip to content

Commit

Permalink
removed generated Coq files from the repo; added logic to regenerate …
Browse files Browse the repository at this point in the history
…them in the saw-core-coq/coq Makefile
  • Loading branch information
Eddy Westbrook committed Mar 17, 2022
1 parent e9a6d78 commit eb36b72
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2,178 deletions.
24 changes: 17 additions & 7 deletions saw-core-coq/coq/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
all: build
all: Makefile.coq

Makefile.coq: _CoqProject
coq_makefile -f $< -o $@

build: Makefile.coq
make -f Makefile.coq
include Makefile.coq

clean: Makefile.coq
make -f Makefile.coq clean
# If running in CI, always set $SAW=`which saw`. Otherwise, if saw is not in the
# current path, fall back on cabal run saw
SAW=$(shell which saw)
ifeq ($(SAW),)
ifeq ($(CI),)
SAW=cabal run saw
else
$(error Could not find SAW executable; PATH = $(PATH))
endif
endif

%.vo: Makefile.coq
make -f Makefile.coq $@
generated/CryptolToCoq/SAWCorePrelude.v: ../../saw-core/prelude/Prelude.sawcore
(cd ../saw; $(SAW) generate_scaffolding.saw)

generated/CryptolToCoq/CryptolPrimitivesForSAWCore.v: ../../cryptol-saw-core/saw/Cryptol.sawcore
(cd ../saw; $(SAW) generate_scaffolding.saw)
1 change: 1 addition & 0 deletions saw-core-coq/coq/generated/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.v
Loading

0 comments on commit eb36b72

Please sign in to comment.