From: Alistair Thomas Date: Sat, 11 Mar 2017 22:52:00 +0000 (+0000) Subject: manual: Add pdf target that uses WeasyPrint X-Git-Tag: 0.35.90~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e70fb8a0e3af770d4e2d43df60408f611a179b3;p=thirdparty%2Fvala.git manual: Add pdf target that uses WeasyPrint --- diff --git a/configure.ac b/configure.ac index 030957e46..14a771baa 100644 --- a/configure.ac +++ b/configure.ac @@ -97,6 +97,9 @@ AC_SUBST(GMODULE_LIBS) 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]) diff --git a/doc/manual/.gitignore b/doc/manual/.gitignore index fbf57b271..f0b379c98 100644 --- a/doc/manual/.gitignore +++ b/doc/manual/.gitignore @@ -1,4 +1,5 @@ manual.html +manual.pdf version.xml devhelp/ html/ diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index 1791d908c..837291f23 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -48,12 +48,25 @@ manual.html: manual.xml version.xml common.xsl print.xsl default.css $(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)