-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 688 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (26 loc) · 688 Bytes
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
packagefile = dist/package.conf.inplace
GHCFLAGS = -package-conf $(packagefile) -Wall
package-config = dist/setup-config
maindir = dist/main-out
main = $(maindir)/main
default:$(main)
all:$(main) launch
launch:$(main)
sudo openvt -ws -- sh -c './$< ; read -n1 -r'
$(main):main.hs $(packagefile)
mkdir -p $(maindir)
ghc $< -outputdir $(maindir) -o $@ $(GHCFLAGS)
ghci:main.hs $(packagefile)
ghci $< $(GHCFLAGS)
$(packagefile):$(package-config)
cabal build
$(package-config):
cabal configure
clean:
rm -rf $(maindir)
cleanall:clean
cabal clean
edit:
@find src -type f -exec emacsclient -n {} +
@emacsclient -n main.hs
.PHONY:default all launch ghci clean cleanall edit