## @file
##
## $Id: makefile.am 2 2009-06-16 13:20:59Z  $
##
## $Date: 2008-08-26 13:09:21 $
## $Author: marc $
##
## @copy &copy; Marc W&auml;ckerlin
## @license LGPL, see file <a href="license.html">COPYING</a>
##
##       1         2         3         4         5         6         7         8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890

SUBDIRS = @SRC_DIR@ @TST_DIR@ @DOC_DIR@

nobase_include_HEADERS =

EXTRA_DIST = bootstrap.sh debian

DISTCLEANFILES = debian/changelog

deb: dist
	tar xzvf @PACKAGE@-@VERSION@.tar.gz
	cd @PACKAGE@-@VERSION@ && dpkg-buildpackage
	rm -rf @PACKAGE@-@VERSION@ 

doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog @PACKAGENAME@.spec

RPMS = /usr/src/packages/RPMS/i586/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm \
     /usr/src/packages/RPMS/i586/@PACKAGENAME@-devel-@MAJOR@.@MINOR@.@LEAST@-1.i586.rpm \
     /usr/src/packages/SRPMS/@PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@-1.src.rpm

.PHONY: release tag rpm webserver \
        doc clean-local distclean-local dist-hool install-data-hook \
        uninstall-hook

release: tag webserver

tag: distcheck
	cvs ci -R .
	cvs tag -FR REL_@PACKAGENAME@-@MAJOR@-@MINOR@-@LEAST@ .

rpm: dist
	cp @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \
	/usr/src/packages/SOURCES/
	rpmbuild -ba --clean @PACKAGENAME@.spec

deps = ${top_srcdir}/COPYING ${top_srcdir}/README ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog

clean-local:
	- rm doxygen.err lib@PACKAGENAME@.doxytag
	- rm @PACKAGENAME@-dev_@MAJOR@.@MINOR@.@LEAST@-*.deb \
	     @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.changes \
	     @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.tar.gz \
	     @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-1.dsc \
	     @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \
	     @PACKAGENAME@_@MAJOR@.@MINOR@.@LEAST@-*.deb

distclean-local:
	- rm -r ${top_builddir}/@DOC_DIR@/html/* ${top_builddir}/@DOC_DIR@/latex/*
	- rm makefile makefile.in doxygen.err libmrw.doxytag
	- find . -name '*~' | xargs rm
	- rm -r autom4te.cache
	- rm aclocal.m4 config.guess config.sub configure \
	     depcomp install-sh ltmain.sh makefile makefile.in \
	     missing mkinstalldirs
