File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
- # NOTE: `cabal` will take care to build the local `alex` executable and place it into $PATH for us to pick up
2
- ALEX: =$(shell which alex)
1
+ # NOTE: `cabal test` will take care to build the local `alex`
2
+ # executable and place it into $PATH for us to pick up.
3
+ #
4
+ # If it doesn't look like the alex binary in $PATH comes from the
5
+ # build tree, then we'll fall back to pointing to
6
+ # ../dist/build/alex/alex to support running tests via "runghc
7
+ # Setup.hs test".
8
+ #
9
+ ALEX =$(shell which alex)
10
+ ifeq "$(filter $(dir $(shell pwd) ) % ,$(ALEX ) ) " ""
11
+ ALEX =../dist/build/alex/alex
12
+ endif
13
+
3
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`.
4
15
HC =ghc
5
16
HC_OPTS =-Wall -fno-warn-missing-signatures -fno-warn-unused-imports -fno-warn-tabs -Werror
You can’t perform that action at this time.
0 commit comments