@@ -9,13 +9,20 @@ lib := ../dist/build/libHStext-$(version).a
99lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
1010 sed -e 's,\.,/,g' -e 's,$$,.hs,')
1111
12+cabal := $(shell which cabal 2>/dev/null)
13+
1214all: qc coverage
1315
1416lib: $(lib)
1517
1618$(lib): $(lib-srcs:%=../%)
19+ifeq ($(cabal),)
1720 cd .. && runghc Setup configure --user --prefix=$(HOME)
1821 cd .. && runghc Setup build
22+else
23+ cd .. && cabal configure
24+ cd .. && cabal build
25+endif
1926
2027Properties.o: QuickCheckUtils.o
2128