Skip to content

Commit

Permalink
build/HACKING: add check for pandoc and update make rule for HACKING.pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
pjakma committed Feb 7, 2017
1 parent b29cd82 commit 3c06ac0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ EXTRA_DIST = aclocal.m4 SERVICES TODO REPORTING-BUGS INSTALL.quagga.txt \
vtysh/Makefile.in vtysh/Makefile.am \
tools/zebra.el tools/multiple-bgpd.sh

if HAVE_LATEX
if HAVE_PANDOC

HACKING.pdf: HACKING.tex
$(LATEXMK) -pdf $<
HACKING.pdf: HACKING.md
pandoc -o $@ $<

clean-local:
-$(LATEXMK) -C HACKING.tex
Expand Down
11 changes: 10 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ dnl autoconf 2.59 appears not to support AC_PROG_SED
dnl AC_PROG_SED
AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])

dnl pdflatex and latexmk are needed to build HACKING.pdf
dnl Check for pdflatex and latexmk, in case someone wants to build
dnl PDFs from TeX (as used to be case for HACKING)
AC_CHECK_PROG([PDFLATEX],[pdflatex],[pdflatex],[/bin/false])
AC_CHECK_PROG([LATEXMK],[latexmk],[latexmk],[/bin/false])
if test "x$PDFLATEX" = "x/bin/false" -o "x$LATEXMK" = "x/bin/false"; then
Expand All @@ -92,6 +93,14 @@ else
HAVE_LATEX=true
fi
AM_CONDITIONAL([HAVE_LATEX], [test "x$HAVE_LATEX" = "xtrue"])
dnl for making HACKING.pdf from HACKING.md using pandoc
AC_CHECK_PROG([PANDOC],[pandoc],[pandoc],[/bin/false])
if test "x$PDFLATEX" = "x/bin/false" -o "x$PANDOC" = "x/bin/false"; then
AC_MSG_WARN([Will not be able to make PDF versions of MD documents])
else
HAVE_PANDOC=true
fi
AM_CONDITIONAL([HAVE_PANDOC], [test "x$HAVE_PANDOC" = "xtrue"])

if test "x${GCC}" != "xyes" ; then
AC_MSG_CHECKING([whether we are using SunPro compiler])
Expand Down

0 comments on commit 3c06ac0

Please sign in to comment.