ACLOCAL_AMFLAGS = -I m4

SUBDIRS		= lasso \
		  tests \
		  win32 \
		  bindings \
		  docs

EXTRA_DIST	= COPYING lasso.pc.in lasso-src-config.in autogen.sh tools abi \
	lasso.doap README.JAVA README.WIN32 HACKING logos $(top_srcdir)/.version

BUILT_SOURCES = $(top_srcdir)/.version

MAINTAINERCLEANFILES = \
    Makefile.in \
    config.guess \
    config.sub \
    configure \
    install-sh \
    missing

pkgconfig_DATA	= lasso.pc
pkgconfigdir	= $(libdir)/pkgconfig

clean-local:
	-rm -f lasso.pc

dist-hook:
	@if test -d "$(srcdir)/.git"; \
	then \
		echo Creating ChangeLog && \
		( cd "$(top_srcdir)" && \
		  echo '# Generated by Makefile. Do not edit.'; echo; \
		  $(top_srcdir)/missing --run git log --stat ) > ChangeLog.tmp \
		&& mv -f ChangeLog.tmp $(distdir)/ChangeLog \
		|| ( rm -f ChangeLog.tmp ; \
		     echo Failed to generate ChangeLog >&2 ); \
	else \
		echo A git clone is required to generate a ChangeLog >&2; \
	fi
	echo $(VERSION) > $(distdir)/.tarball-version

DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc

$(top_srcdir)/.version:
	echo $(VERSION) > $@-t && mv $@-t $@
