on master help sign in
Use cabal instead of runghc Setup if available
29ba0abBryan O'Sullivan
tests/Makefile+7
@@ -9,13 +9,20 @@ lib := ../dist/build/libHStext-$(version).a
9lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
9lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
10 sed -e 's,\.,/,g' -e 's,$$,.hs,')
10 sed -e 's,\.,/,g' -e 's,$$,.hs,')
11
11
12+cabal := $(shell which cabal 2>/dev/null)
13+
12all: qc coverage
14all: qc coverage
13
15
14lib: $(lib)
16lib: $(lib)
15
17
16$(lib): $(lib-srcs:%=../%)
18$(lib): $(lib-srcs:%=../%)
19+ifeq ($(cabal),)
17 cd .. && runghc Setup configure --user --prefix=$(HOME)
20 cd .. && runghc Setup configure --user --prefix=$(HOME)
18 cd .. && runghc Setup build
21 cd .. && runghc Setup build
22+else
23+ cd .. && cabal configure
24+ cd .. && cabal build
25+endif
19
26
20Properties.o: QuickCheckUtils.o
27Properties.o: QuickCheckUtils.o
21
28