Skip to content

Commit

Permalink
configure: Detect pandoc for building documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and GitLab committed Oct 12, 2016
1 parent 8177c14 commit 48e4a5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -13,6 +13,8 @@ EXTRA_DIST = \
COPYING.LGPL \
COPYING.MIT \
ChangeLog \
README \
README.md \
update-version.sh \
run-test-valgrind.supp \
$(conf_DATA)
Expand All @@ -21,6 +23,9 @@ noinst_DATA = dovecot-config

nodist_pkginclude_HEADERS = config.h

README: README.md
$(PANDOC) -f markdown_github -t plain -o $@ $<

ChangeLog:
git log --name-status --pretty="format:%ai %aN <%aE> (%h)%n%n%w(80,4,4)%s%n%n%b" 5d5c4f2bfb812c767084c0338dae692db476da10^.. > ChangeLog || rm -f ChangeLog

Expand Down
11 changes: 11 additions & 0 deletions configure.ac
Expand Up @@ -819,6 +819,17 @@ AC_SUBST(NOPLUGIN_LDFLAGS)

DC_CC_WRAPPER

AC_ARG_VAR(PANDOC, [Path to pandoc program])

# Optional tool for making documentation
AC_CHECK_PROGS(PANDOC, [pandoc], [true])

if test "$PANDOC" = "true"; then
if test ! -e README; then
AC_MSG_ERROR([Cannot produce documentation without pandoc])
fi
fi

if test "$docdir" = ""; then
dnl docdir supported only by autoconf v2.59c and later
docdir='${datadir}/doc/${PACKAGE_TARNAME}'
Expand Down

0 comments on commit 48e4a5c

Please sign in to comment.