Skip to content

Commit 85d3def

Browse files
authored
Merge pull request #173 from simonmar/fix-travis
Try to fix build by syncing with happy
2 parents e9a9d1c + ff9edf7 commit 85d3def

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ env:
1717
before_install:
1818
- sudo add-apt-repository -y ppa:hvr/ghc
1919
- 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
2222

2323
install:
2424
- cabal update

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ sdist ::
1818
echo "Error: Tree is not clean"; \
1919
exit 1; \
2020
fi
21-
rm -rf dist/
2221
$(HAPPY) $(HAPPY_OPTS) src/Parser.y -o src/Parser.hs
2322
$(ALEX) $(ALEX_OPTS) src/Scan.x -o src/Scan.hs
2423
mv src/Parser.y src/Parser.y.boot
2524
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
2827
@if [ ! -f "${SDIST_DIR}/alex-$(ALEX_VER).tar.gz" ]; then \
2928
echo "Error: source tarball not found: dist/alex-$(ALEX_VER).tar.gz"; \
3029
exit 1; \
@@ -43,7 +42,7 @@ sdist-test-only ::
4342
rm -rf "${SDIST_DIR}/alex-$(ALEX_VER)/"
4443
tar -xf "${SDIST_DIR}/alex-$(ALEX_VER).tar.gz" -C ${SDIST_DIR}/
4544
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
4746
@echo ""
4847
@echo "Success! ${SDIST_DIR}/alex-$(ALEX_VER).tar.gz is ready for distribution!"
4948
@echo ""

test.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ import System.Process (system)
22
import System.Exit (exitWith)
33

44
main = system "make -k -C tests clean all" >>= exitWith
5-

tests/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ALEX=../dist/build/alex/alex
1212
endif
1313

1414
# 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
1616

1717
# Some GHC warnings are only available from a certain version on
1818
# Get the GHC version
@@ -101,5 +101,3 @@ interact:
101101

102102
debug :
103103
@echo HC_OPTS=$(HC_OPTS)
104-
105-
# EOF

0 commit comments

Comments
 (0)