Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile robustness #325

Merged
merged 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.PHONY : install agda repl libHtml test testHtml golden docs
FILES = $(shell find src -type f)

install :
cabal install --overwrite-policy=always
Expand All @@ -13,7 +14,7 @@ libHtml :
cabal run agda2hs -- --html lib/Haskell/Prelude.agda
cp html/Haskell.Prelude.html html/index.html

test/agda2hs : src/*.hs
test/agda2hs : $(FILES)
cabal install agda2hs --overwrite-policy=always --installdir=test --install-method=copy

test : test/agda2hs
Expand Down
6 changes: 3 additions & 3 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FAIL_MAIN=AllFailTests
.PHONY : default allTests print-fail fail compare golden \
html renderTranslations clean force-recompile

default : allTests fail compare
default : compare

build/%.hs : %.agda *.agda Fail/*.agda Cubical/*.agda
@echo == Compiling tests ==
Expand All @@ -21,11 +21,11 @@ print-fail :

fail : print-fail $(patsubst Fail/%.agda,build/%.err,$(wildcard Fail/*.agda))

build/%.err : Fail/%.agda force-recompile allTests
build/%.err : Fail/%.agda force-recompile
@echo Compiling $<
@($(AGDA2HS) $< -o build -v0 && echo "UNEXPECTED SUCCESS" || true) | sed -e 's:'$(ROOT)'::g' > $@

compare : fail
compare : allTests fail
@echo == Comparing output ==
@diff -r build golden

Expand Down
Loading