switch to using stack

This commit is contained in:
Zachary Snow 2019-02-11 23:44:02 -05:00
parent 9fd79068f3
commit 6c88994ea9
5 changed files with 12 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.swp
dist/
bin/
.stack-work/

View File

@ -1,2 +0,0 @@
Lex.hs
Parse.hs

View File

@ -2,18 +2,10 @@
all: sv2v
Language/SystemVerilog/Parser/Lex.hs: Language/SystemVerilog/Parser/Lex.x
alex -g Language/SystemVerilog/Parser/Lex.x -o Language/SystemVerilog/Parser/Lex.hs
Language/SystemVerilog/Parser/Parse.hs: Language/SystemVerilog/Parser/Parse.y
happy -agc Language/SystemVerilog/Parser/Parse.y -o Language/SystemVerilog/Parser/Parse.hs
sv2v: Language/SystemVerilog/Parser/Lex.hs Language/SystemVerilog/Parser/Parse.hs
cabal build
sv2v:
mkdir -p bin
cp dist/build/sv2v/sv2v bin/sv2v
stack install --allow-different-user --install-ghc --local-bin-path bin
clean:
rm -rfy bin/sv2v
rm -f Language/SystemVerilog/Parser/Lex.hs
rm -f Language/SystemVerilog/Parser/Parse.hs
stack clean
rm -rf bin

4
stack.yaml Normal file
View File

@ -0,0 +1,4 @@
resolver: lts-12.5
packages:
- .

View File

@ -45,6 +45,9 @@ library
executable sv2v
default-language: Haskell2010
main-is: sv2v.hs
build-tools:
alex >= 3 && < 4,
happy >= 1 && < 2
build-depends:
array,
base