From 6c88994ea91f27af013e655129cf9acaa4fd4c4a Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Mon, 11 Feb 2019 23:44:02 -0500 Subject: [PATCH] switch to using stack --- .gitignore | 1 + Language/SystemVerilog/Parser/.gitignore | 2 -- Makefile | 16 ++++------------ stack.yaml | 4 ++++ sv2v.cabal | 3 +++ 5 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 Language/SystemVerilog/Parser/.gitignore create mode 100644 stack.yaml diff --git a/.gitignore b/.gitignore index 97a347b..58643f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.swp dist/ bin/ +.stack-work/ diff --git a/Language/SystemVerilog/Parser/.gitignore b/Language/SystemVerilog/Parser/.gitignore deleted file mode 100644 index 927fc6a..0000000 --- a/Language/SystemVerilog/Parser/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Lex.hs -Parse.hs diff --git a/Makefile b/Makefile index 810250c..ef22df2 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..3be80cc --- /dev/null +++ b/stack.yaml @@ -0,0 +1,4 @@ +resolver: lts-12.5 + +packages: +- . diff --git a/sv2v.cabal b/sv2v.cabal index 6120561..cacc136 100644 --- a/sv2v.cabal +++ b/sv2v.cabal @@ -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