AC_PATH_PROG([XSLTPROC], [xsltproc], :)
AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
+AC_CHECK_PROG([WEASYPRINT], [weasyprint], [weasyprint])
+AM_CONDITIONAL(HAVE_WEASYPRINT, [test x$WEASYPRINT = xweasyprint])
+
AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HELP2MAN = xhelp2man])
$(srcdir)/print.xsl \
$(srcdir)/manual.xml
+if HAVE_WEASYPRINT
+pdf: manual.pdf
+manual.pdf: manual.html default.css
+ @echo Generating PDF version of manual, this may take some time...
+ $(AM_V_GEN)$(WEASYPRINT) \
+ manual.html \
+ $@
+else
+pdf:
+ @echo Install weasyprint and re-run ./configure to generate a PDF of the Vala manual
+endif
+
mostlyclean-local:
rm -rf devhelp
rm -rf html
CLEANFILES = \
manual.html \
+ manual.pdf \
version.xml \
$(NULL)