Skip to content

Commit

Permalink
Change Makefile to use cabal instead of stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Jul 30, 2022
1 parent df6ac58 commit b2b651e
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ ALL=skylighting/src/Skylighting/Syntax.hs quick

all: $(ALL)

quick:
stack install --system-ghc --test --flag "skylighting:executable" --test-arguments '--hide-successes $(TESTARGS)'
quick: skylighting/src/Skylighting/Syntax.hs
cabal test -fexecutable --test-options='--hide-successes $(TESTARGS)' all
cabal install -fexecutable all

test:
stack test --system-ghc --test-arguments '--hide-successes $(TESTARGS)'
cabal test --test-options '--hide-successes $(TESTARGS)'

bench:
stack bench --system-ghc --flag 'skylighting:executable'
cabal bench -fexecutable

format: skylighting-format skylighting-core-format

Expand All @@ -32,11 +33,9 @@ skylighting-format:
bootstrap: skylighting/src/Skylighting/Syntax.hs

skylighting/src/Skylighting/Syntax.hs: $(XMLS)
stack install --system-ghc --flag "skylighting-core:executable" skylighting-core
cabal build -fexecutable skylighting-core
-rm -rf skylighting/src/Skylighting/Syntax skylighting/src/Skylighting/Syntax.hs
cd skylighting && skylighting-extract ../skylighting-core/xml
stack install --system-ghc --flag "skylighting:executable" --test --test-arguments \
'--hide-successes $(TESTARGS)'
cd skylighting && cabal run skylighting-extract -fexecutable -- ../skylighting-core/xml

syntax-highlighting:
git clone https://github.com/KDE/syntax-highlighting
Expand All @@ -49,7 +48,7 @@ update-xml: syntax-highlighting
for x in *.xml.patch; do patch < $$x; done

clean:
stack clean
cabal clean

.PHONY: all update-xml quick clean test format

0 comments on commit b2b651e

Please sign in to comment.