-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
Makefile
54 lines (40 loc) · 1.57 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
XMLS=$(wildcard skylighting-core/xml/*.xml)
ALL=skylighting/src/Skylighting/Syntax.hs quick
all: $(ALL)
quick: skylighting/src/Skylighting/Syntax.hs
cabal test -fexecutable --test-options='--hide-successes $(TESTARGS)' all
cabal install -fexecutable exe:skylighting
test:
cabal test --test-options '--hide-successes $(TESTARGS)'
bench:
cabal bench skylighting-core
format: skylighting-format skylighting-core-format
skylighting-core-format:
stylish-haskell -i -c .stylish-haskell \
skylighting-core/bin/*.hs \
skylighting-core/test/test-skylighting.hs \
skylighting-core/benchmark/benchmark.hs \
skylighting-core/Setup.hs \
skylighting-core/src/Skylighting/*.hs \
skylighting-core/src/Skylighting/Format/*.hs
skylighting-format:
stylish-haskell -i -c .stylish-haskell \
skylighting/bin/*.hs \
skylighting/Setup.hs \
skylighting/src/Skylighting.hs
bootstrap: skylighting/src/Skylighting/Syntax.hs
skylighting/src/Skylighting/Syntax.hs: $(XMLS)
cabal build -fexecutable skylighting-core
-rm -rf skylighting/src/Skylighting/Syntax skylighting/src/Skylighting/Syntax.hs
cd skylighting && cabal run skylighting-extract -fexecutable -- ../skylighting-core/xml
syntax-highlighting:
git clone https://github.com/KDE/syntax-highlighting
update-xml: syntax-highlighting
cd syntax-highlighting; \
git pull; \
cd ../skylighting-core/xml; \
for x in *.xml; do cp ../../syntax-highlighting/data/syntax/$$x ./; done ; \
for x in *.xml.patch; do patch < $$x; done
clean:
cabal clean
.PHONY: all update-xml quick clean test format