-
Notifications
You must be signed in to change notification settings - Fork 166
/
Makefile
51 lines (37 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This Makefile mostly serves to abbreviate build commands that are
# unnecessarily obtuse or longwinded. It depends on the underlying
# build tool (cabal) to actually do anything incrementally.
# Configuration is mostly read from cabal.project.
PREFIX?=$(HOME)/.local
INSTALLBIN?=$(PREFIX)/bin/futhark
UNAME:=$(shell uname)
# Disable all implicit rules.
.SUFFIXES:
.PHONY: all configure build install docs check check-commit clean
all: build
configure:
cabal update
cabal configure
configure-profile:
cabal configure --enable-profiling --profiling-detail=toplevel-functions
build:
cabal build
install: build
install -d $(shell dirname $(INSTALLBIN))
install "$$(cabal -v0 list-bin exe:futhark)" $(INSTALLBIN)
docs:
cabal haddock \
--enable-documentation \
--haddock-html \
--haddock-options=--show-all \
--haddock-options=--quickjump \
--haddock-options=--show-all \
--haddock-options=--hyperlinked-source
check:
tools/style-check.sh src unittests
check-commit:
tools/style-check.sh $$(git diff-index --cached --ignore-submodules=all --name-status HEAD | awk '$$1 != "D" { print $$2 }')
unittest:
cabal run unit
clean:
cabal clean