PDNS_WITH_SQLITE3
PDNS_CHECK_PANDOC
-PDNS_CHECK_MKDOCS
-PDNS_CHECK_LINKCHECKER
+PDNS_FROM_GIT
dnl Checks for library functions.
AC_CHECK_FUNCS_ONCE([strcasestr localtime_r recvmmsg])
dist_man_MANS = $(MANPAGES_TARGET_AUTH) $(MANPAGES_TARGET_TOOLS)
endif
-EXTRA_DIST = manpages \
- markdown
+EXTRA_DIST = manpages markdown/*.md markdown/appendix markdown/authoritative markdown/common markdown/httpapi markdown/recursor markdown/security markdown/tools
+
.PHONY: html all-manpages
+
html: html/index.html
+if FROM_GIT
html/index.html: process-md.sh mkdocs.yml markdown/** markdown/*/** manpages/*
mkdir -p doc-build
rsync -a --delete markdown/. doc-build/.
html.tar.bz2: html
tar cjf html.tar.bz2 html/
+check-links: html
+ ./checklinks.sh
+
+publish: html html.tar.bz2
+ rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html/ web1.powerdns.com:/srv/www/doc.powerdns.com/md
+ rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/html.tar.bz2
+else
+html/index.html:
+ @echo "Building the documentation HTML is only"
+ @echo "supported from a git checkout"
+endif
+
all-manpages: $(MANPAGES_TARGET_ALL)
if HAVE_PANDOC
exit 1
endif
-if HAVE_LINKCHECKER
-check-links: html
- ./checklinks.sh
-endif
-
clean:
rm -rf html html.tar.bz2 *.8 *.1
-
-publish: html html.tar.bz2
- rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html/ web1.powerdns.com:/srv/www/doc.powerdns.com/md
- rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./html.tar.bz2 web1.powerdns.com:/srv/www/doc.powerdns.com/html.tar.bz2
+++ /dev/null
-AC_DEFUN([PDNS_CHECK_LINKCHECKER], [
- AC_CHECK_PROG([LINKCHECKER], [linkchecker], [linkchecker], [no])
-
- AS_IF([test "x$LINKCHECKER" = "xno"], [
- AC_MSG_WARN([linkchecker is missing, unable to verify links in the documentation.])
- ])
- AM_CONDITIONAL([HAVE_LINKCHECKER], [test "x$LINKCHECKER" != "xno"])
-])
-
+++ /dev/null
-AC_DEFUN([PDNS_CHECK_MKDOCS], [
- AC_CHECK_PROG([MKDOCS], [mkdocs], [yes], [no])
-
- AS_IF([test "x$MKDOCS" = "xno"], [
- AS_IF([test ! -d "$scrdir/docs/html" ],
- [AC_MSG_WARN([mkdocs is missing, unable to build documentation.])]
- )
- ])
-])
--- /dev/null
+AC_DEFUN([PDNS_FROM_GIT], [
+ AM_CONDITIONAL([FROM_GIT], [test -d "$srcdir/.git"])
+])