PACKAGES=collections-api collections-base-instances collections-rangedsets-instances .

real-default: install


fixme:
	find . -path "./_darcs" -prune -o -type f -name "*.hs" -print0 | xargs -0 -e grep -ni -e fixme

# Put automatic haddock comments in Properties.hs
fixup:
	make -C tools
	tools/annotateProps <collections-api/Data/Collections/Properties.hs >tmp
	mv tmp collections-api/Data/Collections/Properties.hs

interactive:
	ghci -Iinclude -cpp Data/Collections.hs

clean: 
	for p in $(PACKAGES); do (cd $$p && runhaskell Setup.hs clean); done
	make -C tests clean

install:
	for p in $(PACKAGES); do (cd $$p && \
				 runhaskell Setup.hs configure --prefix=$$HOME/usr &&\
	                         runhaskell Setup.hs build &&\
				 runhaskell Setup.hs install); done

test:
	make -C tests

bench:
	make -C benchmark

doc:
	runhaskell Setup.hs haddock

