# require automake-1.6
AUTOMAKE_OPTIONS = 1.6

if ENABLE_PYTHON

SUBDIRS = diacanvas po python demos unit_tests doc

else

SUBDIRS = diacanvas po demos unit_tests doc

endif

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

$(pkgconfig_DATA): config.status

.PHONY: release snapshot release-debian

release:
	$(MAKE) dist
	tar zxf $(PACKAGE)-$(VERSION).tar.gz && cd $(PACKAGE)-$(VERSION) && \
	./configure && make all check && cd .. && rm -rf $(PACKAGE)-$(VERSION)

snapshot:
	$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`

release-debian:
	$(MAKE) dist
	tar zxf $(PACKAGE)-$(VERSION).tar.gz && cd $(PACKAGE)-$(VERSION) && \
	dpkg-buildpackage -rfakeroot && cd .. && chown $$USER.$$USER *.deb && rm -rf $(PACKAGE)-$(VERSION)

debian_files = \
	debian/changelog		\
	debian/copyright		\
	debian/control			\
	debian/diacanvas2-dev.files	\
	debian/diacanvas2-doc.files	\
	debian/python-diacanvas2.files	\
	debian/diacanvas2.postinst	\
	debian/rules

EXTRA_DIST = diacanvas2.pc.in ABOUT-NLS scripts/gtkdoc-mkpdf $(debian_files)

