forked from jappeace/cut-the-crap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
66 lines (47 loc) · 1.35 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
OPTIMIZATION=-O0
build:
nix-shell --run "cabal new-build all -j --ghc-options $(OPTIMIZATION)"
haddock:
nix-shell --run "cabal new-haddock all"
hpack:
nix-shell ./hpack-shell.nix --run "make update-cabal"
ghcid: clean hpack etags
nix-shell --run "ghcid -s \"import Main\" -c \"cabal new-repl\" -T \"main\" test:unit"
ghci:
nix-shell --run "cabal new-repl test:unit"
etags:
nix-shell --run "hasktags -e ./src"
update-cabal:
hpack --force ./
cabal2nix . > dependencies.nix
enter:
nix-shell --cores 0 -j 8 --pure
RUN=""
run-in-shell:
nix-shell --cores 0 -j 8 --run "$(RUN)"
WORK="/tmp/cut-the-crap"
clean-work-dir:
rm -fR $(WORK)
mkdir -p $(WORK)
runDebug: clean-work-dir
cabal new-run cut-the-crap --ghc-options $(OPTIMIZATION) -- \
--inFile ./input.mkv \
--outFile out.mkv \
--voiceTrack 1 \
--workDir $(WORK)
runMusic:
nix-shell --run "./run-music.sh ~/streams/"
run: hpack
nix-shell --run "make runDebug"
clean: clean-work-dir
rm -fR dist dist-*
.PHONY: test run_
sdist:
make run-in-shell RUN="cabal sdist"
brittany_:
$(shell set -x; for i in `fd hs`; do hlint --refactor --refactor-options=-i $$i; brittany --write-mode=inplace $$i; done)
brittany:
nix-shell ./travis-shell.nix --run "make brittany_"
ubuntu-release:
docker build -t ubuntu-release scripts
docker run -v ~/projects/cut-the-crap:/home/jappie -t ubuntu-release