#
# This Makefile creates a patch of CVS that contains loginfofilter specific
# loginfo output.
#
# This Makefile will download the source of cvs if nessasary.

VERS=1.11.1p1
CVSNAMEVERS=cvs-$(VERS)

test_install_cvs :
	if [ "x`cvs --version | grep 'Concurrent Versions System'`x" != 'xConcurrent Versions System (CVS) 1.11p1 (client/server)x' ] ; then \
		$(MAKE) install_cvs ; \
	fi \


install_cvs : $(CVSNAMEVERS).tar.gz
	rm -rf $(CVSNAMEVERS)
	tar xzf $(CVSNAMEVERS).tar.gz
	cd $(CVSNAMEVERS)/src ; patch < ../../../patches/logformat.patch
	cd $(CVSNAMEVERS) ; \
		./configure \
			--prefix=/usr \
			--enable-client \
			--enable-server
	$(MAKE) -C $(CVSNAMEVERS)

	
$(CVSNAMEVERS).tar.gz :
	wget ftp://ftp.cvshome.org/pub/cvs-1.11.1/$(CVSNAMEVERS).tar.gz


