-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
44 lines (28 loc) · 902 Bytes
/
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
TARGET := cabal-macosx
SRC := Distribution
HASKELLS := $(shell find $(SRC) -name "*.hs" -or -name "*.lhs")
HADDOCKS := dist/doc/html/$(TARGET)
clean:
@find . -name '*~' -exec rm -vf {} ';' && \
find . -name '*.hi' -exec rm -vf {} ';' && \
find . -name '*.o' -exec rm -vf {} ';' && \
runghc Setup clean
nuke: clean
dist/setup-config: $(TARGET).cabal
runghc Setup configure
dist/build: $(HASKELLS) dist/setup-config
runghc Setup build
configure: $(HASKELLS) dist/setup-config
$(HADDOCKS)/index.html: configure
runghc Setup haddock --hyperlink-source
haddock: $(HADDOCKS)/index.html
haddockall: configure
runghc Setup haddock --hyperlink-source --internal
build: dist/build
sdist: dist/build
runghc Setup sdist
view: haddock
open $(HADDOCKS)/index.html
lint:
hlint $(HASKELLS)
.PHONY: clean configure build haddock sdist view lint nuke