File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 17
17
before_install :
18
18
- sudo add-apt-repository -y ppa:hvr/ghc
19
19
- sudo apt-get update
20
- - sudo apt-get install alex-3.1.7 happy-1.19.5 cabal-install-head ghc-$GHCVER
21
- - export PATH=/opt/cabal/head /bin:/opt/ghc/$GHCVER/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH
20
+ - sudo apt-get install alex-3.1.7 happy-1.19.5 cabal-install-3.4 ghc-$GHCVER
21
+ - export PATH=/opt/cabal/3.4 /bin:/opt/ghc/$GHCVER/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$PATH
22
22
23
23
install :
24
24
- cabal update
Original file line number Diff line number Diff line change @@ -18,13 +18,12 @@ sdist ::
18
18
echo " Error: Tree is not clean" ; \
19
19
exit 1; \
20
20
fi
21
- rm -rf dist/
22
21
$(HAPPY ) $(HAPPY_OPTS ) src/Parser.y -o src/Parser.hs
23
22
$(ALEX ) $(ALEX_OPTS ) src/Scan.x -o src/Scan.hs
24
23
mv src/Parser.y src/Parser.y.boot
25
24
mv src/Scan.x src/Scan.x.boot
26
- $(CABAL ) new -run gen-alex-sdist
27
- $(CABAL ) new -sdist
25
+ $(CABAL ) v2 -run gen-alex-sdist
26
+ $(CABAL ) v2 -sdist
28
27
@if [ ! -f " ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz" ]; then \
29
28
echo " Error: source tarball not found: dist/alex-$( ALEX_VER) .tar.gz" ; \
30
29
exit 1; \
@@ -43,7 +42,7 @@ sdist-test-only ::
43
42
rm -rf " ${SDIST_DIR} /alex-$( ALEX_VER) /"
44
43
tar -xf " ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz" -C ${SDIST_DIR} /
45
44
echo " packages: ." > " ${SDIST_DIR} /alex-$( ALEX_VER) /cabal.project"
46
- cd " ${SDIST_DIR} /alex-$( ALEX_VER) /" && cabal new -test --enable-tests all
45
+ cd " ${SDIST_DIR} /alex-$( ALEX_VER) /" && cabal v2 -test --enable-tests all
47
46
@echo " "
48
47
@echo " Success! ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz is ready for distribution!"
49
48
@echo " "
Original file line number Diff line number Diff line change @@ -2,4 +2,3 @@ import System.Process (system)
2
2
import System.Exit (exitWith )
3
3
4
4
main = system " make -k -C tests clean all" >>= exitWith
5
-
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ALEX=../dist/build/alex/alex
12
12
endif
13
13
14
14
# NOTE: This assumes that a working `ghc` is on $PATH; this may not necessarily be the same GHC used by `cabal` for building `alex`.
15
- HC = ghc
15
+ HC = ghc
16
16
17
17
# Some GHC warnings are only available from a certain version on
18
18
# Get the GHC version
@@ -101,5 +101,3 @@ interact:
101
101
102
102
debug :
103
103
@echo HC_OPTS=$(HC_OPTS )
104
-
105
- # EOF
You can’t perform that action at this time.
0 commit comments