cabal = $(shell find . -maxdepth 1 -name '*.cabal' -print -quit) package = $(notdir ./$(cabal:.cabal=)) all: build build: cabal build repl: cabal repl t: cabal test --test-show-details always --test-options "--color always --size-cutoff 100000" t/repl: cabal repl --enable-tests symantic-parser-test t/prof: cabal test --enable-profiling --enable-library-coverage --enable-coverage --test-show-details always t/accept: cabal test --test-show-details always --test-options "--accept --color always --size-cutoff 100000" doc: cabal haddock --haddock-css ocean --haddock-hyperlink-source tag: name=$$(sed -ne 's/^name: *\(.*\)/\1/p' "$(cabal)"); \ version=$$(sed -ne 's/^version: *\(.*\)/\1/p' "$(cabal)"); \ git tag --merged | grep -Fqx "$$name-$$version" || \ git tag -f -s -m "$$name v$$version" $$name-$$version tar: cabal sdist upload: LANG=C cabal upload .