#! /usr/bin/make -f

Makefile:
	./configure --prefix=/usr
	@if ! grep -q "HAVE_LIBGC=1" Makefile; then \
		echo "***** Error: bock should be built with libgc installed" 1>&2; \
		exit 1; \
	fi

build: Makefile
	make
	make check

clean:
	if test -e Makefile; then make distclean; fi

install-bock:
	make prefix=$(ROOT)/usr install
	$(RM) $(ROOT)/usr/doc/bock/COPYING
	echo '// Please refer to /usr/doc/bock/copyright for legal details' \
			> $(ROOT)/usr/share/bock/lib/LEGAL
	echo '// pertaining to the files in this directory.' \
			>> $(ROOT)/usr/share/bock/lib/LEGAL
	dpkg-shlibdeps -pbock $(ROOT)/usr/bin/*

finalise-bock:
