]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
manual: Add pdf target that uses WeasyPrint
authorAlistair Thomas <astavale@yahoo.co.uk>
Sat, 11 Mar 2017 22:52:00 +0000 (22:52 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 12 Mar 2017 13:19:38 +0000 (14:19 +0100)
configure.ac
doc/manual/.gitignore
doc/manual/Makefile.am

index 030957e463613b474f40bee3f87584c4c47f6c9a..14a771baa18f96ae9d6a6179ca03bd45d38dcc29 100644 (file)
@@ -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])
 
index fbf57b27163d8726a873a10d0c35ba25f5a9089c..f0b379c9800c66962f115c0f3b8e49a21631b65d 100644 (file)
@@ -1,4 +1,5 @@
 manual.html
+manual.pdf
 version.xml
 devhelp/
 html/
index 1791d908c5db9c385ddf376895c1402de6724113..837291f237b0bb806c2759df9f1d4995c82efcd0 100644 (file)
@@ -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)