# Generated automatically from Makefile.in by configure.
##############################################################################
##
##    Makefile.in                     NQ                         Werner Nickel
##
##    $Id: Makefile.in,v 1.22 2007/02/06 18:15:06 werner Exp $
##

##
##    Values imported from the configure script
##
BINDIR=bin/x86_64
GAP_ROOT=$(PWD)/../..
GNU_MP_INC=.
GNU_MP_LIB=/usr/include
CURRENT_VERSION=2.2
CURRENT_VER=2_2

WEB_DIR  = /www/homepages/nickel/software/NQ/
HTML_DOC = nq-$(CURRENT_VERSION)/doc/chap0.html   nq-$(CURRENT_VERSION)/doc/chap1.html \
	   nq-$(CURRENT_VERSION)/doc/chap2.html   nq-$(CURRENT_VERSION)/doc/chap3.html \
	   nq-$(CURRENT_VERSION)/doc/chap4.html   nq-$(CURRENT_VERSION)/doc/chap5.html \
	   nq-$(CURRENT_VERSION)/doc/chapBib.html nq-$(CURRENT_VERSION)/doc/chapInd.html \
	   nq-$(CURRENT_VERSION)/doc/manual.css   nq-$(CURRENT_VERSION)/doc/manual.pdf

all: compile

gap: compile gapmanual

compile:
	(cd src; make GNU_MP_LIB=/usr/lib64 GNU_MP_INC=/usr/include)
	@if test ! -d bin;  then mkdir bin; fi
	@if test ! -d $(BINDIR);  then mkdir $(BINDIR); fi
	mv src/nq $(BINDIR)

gapmanual:
	cd doc; make

release-2.0:
	cvs export -D 'February 11, 2003 11:00' -d nq-2.0 GAP/4.0/pkg/nq

	find nq-2.0 -name .cvsignore -exec rm "{}" ";"

	rm -f nq-2_0.zoo nq-2_0.tgz nq-2_0.tar
	tar cf nq-2_0.tar nq-2.0
	find nq-2.0 -type f -exec zoo ah nq-2_0.zoo "{}" ";"
	gzip < nq-2_0.tar > nq-2_0.tgz

release-2.1: clean
	cvs export -D 'October 20, 2003 11:00' -d nq-2.1 GAP/4.0/pkg/nq

	find nq-2.1 -name .cvsignore -exec rm "{}" ";"

	cd nq-2.1/doc; make; make clean

	rm -f nq-2_1.zoo nq-2_1.tgz nq-2_1.tar
	tar cf nq-2_1.tar nq-2.1
	find nq-2.1 -type f -exec zoo ah nq-2_1.zoo "{}" ";"
	gzip < nq-2_1.tar > nq-2_1.tgz

release-2.2: clean
	cvs export -D 'February 7, 2007 12:00' -d nq-2.2 GAP/4.0/pkg/nq

	find nq-2.2 -name .cvsignore -exec rm "{}" ";"

	cd nq-2.2/doc; make; make clean

	rm -f nq-2_2.zoo nq-2_2.tgz nq-2_2.tar
	tar cf nq-2_2.tar nq-2.2
	find nq-2.2 -type f -exec zoo ah nq-2_2.zoo "{}" ";"
	gzip < nq-2_2.tar > nq-2_2.tgz

WWW: release-$(CURRENT_VERSION)
	if [ ! -d $(WEB_DIR) ]; then mkdir $(WEB_DIR); fi

	@echo '--> Moving archive files'
	cp nq-$(CURRENT_VER).tar nq-$(CURRENT_VER).tgz nq-$(CURRENT_VER).zoo $(WEB_DIR)

	@echo 'Copying README file'
	cp README $(WEB_DIR) 

	@echo '--> Preparing HTML manual'
	if [ ! -d $(WEB_DIR)/doc ]; then mkdir $(WEB_DIR)/doc; fi
	cp $(HTML_DOC) $(WEB_DIR)/doc

	@echo '--> Preparing PDF- and PS-manuals'
	cp nq-$(CURRENT_VERSION)/doc/manual.pdf $(WEB_DIR)/nqman.pdf
	cp nq-$(CURRENT_VERSION)/doc/manual.ps $(WEB_DIR)/nqman.ps
	cp nq-$(CURRENT_VERSION)/doc/manual.six $(WEB_DIR)/nqman.six
	@echo '--> Copying Package info'
	cp PackageInfo.g $(WEB_DIR)

test:
	(cd examples; make)

clean:
	rm -rf nq-2.? nq-2_?.tar nq-2_?.tgz nq-2_?.zoo
	rm -f *~ */*~ config.cache config.log config.status
	(cd src;      make clean)
	(cd doc;      make clean)
	(cd examples; make clean)

spotless: clean
	rm -f Makefile
	rm -rf bin
	rm -rf .\#*
	(cd src;      make spotless)
	(cd doc;      make spotless)
	(cd examples; make spotless)

