stack_path != which stack all: $(if $(stack_path),,install-stack) stack build ln -sfT $$(stack path --local-install-root)/bin ./bin .PHONY: all run install install-dev-tools run: all ./bin/repgoal install: stack install install-dev-tools: stack install apply-refact hlint stylish-haskell hasktags hoogle become_root != [ "$$(id -u)" = 0 ] || echo sudo install-stack: ifneq (,$(shell which curl)) curl -sSL https://get.haskellstack.org/ | sh else ifneq (,$(shell which wget)) wget -qO- https://get.haskellstack.org/ | sh else ifneq (,$(shell which apt)) $(become_root) apt install haskell-stack else $(error No stack binary found; and no known means of installing (no curl, wget, or apt).\ Follow instructions at ) endif endif endif %.html: %.md pandoc -f markdown -t html -o $@ $^