ACLOCAL_AMFLAGS = -I config
-SUBDIRS=. src doc tests
+SUBDIRS=. src tests
+DIST_SUBDIRS= $(SUBDIRS) doc
AM_CFLAGS=-I$(top_srcdir)/src -Wall -Werror
AM_LDFLAGS=-L$(top_srcdir)/src/ccunit
CLEANFILES=*~ .*~ ./\#*\# *.log configure.scan *.tar.gz *.tar.bz2 *.zip \
docs:
cd doc; $(MAKE) docs
+
+distdocdir=$(PACKAGE)-$(VERSION)-doc
+
+dist-docs: distdocdir
+ cd doc; $(MAKE) dist-docs
+ $(AMTAR) chof - $(distdocdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdocdir).tar.gz
+ $(AMTAR) chof - $(distdocdir) | bzip2 -9 -c >$(distdocdir).tar.bz2
+ -rm -f $(distdocdir).zip
+ zip -rq $(distdocdir).zip $(distdocdir)
+ { test ! -d $(distdocdir) \
+ || { find $(distdocdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdocdir); }; }
+
+distdocdir: docs
+ { test ! -d $(distdocdir) \
+ || { find $(distdocdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdocdir); }; }
+ mkdir $(distdocdir)
+ $(mkinstalldirs) $(distdocdir)/html