@@ -1,16 +1,24 @@
1−all: Properties bin/Bench
1+version := $(shell awk '/^version:/{print $$2}' ../text.cabal)
3+ghcflags := -O -Wall -package bytestring -package QuickCheck \
4+ -hide-package text -i../dist/build -package-name text-$(version)
5+lib := ../dist/build/libHStext-$(version).a
6+lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
7+ sed -e 's,\.,/,g' -e 's,$$,.hs,')
3−.PHONY: Properties
9+all: qc
4−Properties: Properties.hs QuickCheckUtils.hs
5− ghc --make -fforce-recomp Properties
7−bin/Bench: dist/setup-config *.hs
11+lib: $(lib)
11−Setup: Setup.lhs
13+$(lib): $(lib-srcs:%=../%)
12− ghc -O --make $@
14+ cd .. && runghc Setup configure --user --prefix=$(HOME)
13− -rm -f $@.o $@.hi
15+ cd .. && runghc Setup build
17+qc: QuickCheckUtils.o Properties.o $(lib)
18+ $(ghc) $(ghcflags) -o $@ $^
21+ $(ghc) $(ghcflags) -c -o $@ $<
15.PHONY: testdata
23.PHONY: testdata
16testdata: text-testdata.tar.bz2
24testdata: text-testdata.tar.bz2
@@ -18,9 +26,5 @@ testdata: text-testdata.tar.bz2
18text-testdata.tar.bz2:
26text-testdata.tar.bz2:
19 curl -O http://projects.haskell.org/text/text-testdata.tar.bz2
27 curl -O http://projects.haskell.org/text/text-testdata.tar.bz2
21−dist/setup-config: text-tests.cabal Setup
22− ./Setup configure --user --prefix=`pwd`
25− -rm -f *.o *.hi Setup
30+ -rm -f *.o *.hi qc