tests: Move namespaces.vala into parser and merge its main methods
[vala-gnome.git] / doc / manual / Makefile.am
blob3769283147908c05048419d5260aab9ffeb8f248
1 NULL =
3 BOOK_NAME = vala@PACKAGE_SUFFIX@
5 bookdir = $(datadir)/devhelp/books/$(BOOK_NAME)
7 if HAVE_XSLTPROC
8 book_DATA = \
9         devhelp/* \
10         $(NULL)
12 $(builddir)/devhelp/*: devhelp
13 devhelp: manual.xml version.xml common.xsl devhelp.xsl xhtml.xsl default.css
14         @$(MKDIR_P) $@
15         $(AM_V_GEN)$(XSLTPROC) \
16                 --xinclude \
17                 --path $(srcdir) \
18                 --output $@/$(BOOK_NAME).devhelp2 \
19                 $(srcdir)/devhelp.xsl \
20                 $(srcdir)/manual.xml
21         @$(XSLTPROC) \
22                 --xinclude \
23                 --path $(srcdir) \
24                 --output $@/index.html \
25                 $(srcdir)/xhtml.xsl \
26                 $(srcdir)/manual.xml
27         @cp $(srcdir)/default.css $@
28         @touch $@
30 html: manual.xml version.xml common.xsl xhtml.xsl default.css
31         @$(MKDIR_P) $@
32         $(AM_V_GEN)$(XSLTPROC) \
33                 --xinclude \
34                 --stringparam body-class u-center \
35                 --output $@/index.html \
36                 $(srcdir)/xhtml.xsl \
37                 $(srcdir)/manual.xml
38         @cp $(srcdir)/default.css $@
39         @touch $@
41 print: manual.html
42 manual.html: manual.xml version.xml common.xsl print.xsl default.css
43         $(AM_V_GEN)$(XSLTPROC) \
44                 --xinclude \
45                 --path $(srcdir) \
46                 --output $@ \
47                 $(srcdir)/print.xsl \
48                 $(srcdir)/manual.xml
50 if HAVE_WEASYPRINT
51 pdf: manual.pdf
52 manual.pdf: manual.html default.css
53         @echo Generating PDF version of manual, this may take some time...
54         $(AM_V_GEN)$(WEASYPRINT) \
55                 manual.html \
56                 $@
57 else
58 pdf:
59         @echo Install weasyprint and re-run ./configure to generate a PDF of the Vala manual
60 endif
62 endif
64 mostlyclean-local:
65         rm -rf devhelp
66         rm -rf html
68 CLEANFILES = \
69         manual.html \
70         manual.pdf \
71         version.xml \
72         $(NULL)
74 EXTRA_DIST = \
75         common.xsl \
76         default.css \
77         devhelp.xsl \
78         manual.xml \
79         print.xsl \
80         xhtml.xsl \
81         README \
82         $(NULL)
84 MANUAL_DOCBOOK_URL=https://wiki.gnome.org/Projects/Vala/Manual/Export?action=format\&mimetype=text/docbook
86 $(srcdir)/manual.xml:
87         @echo "Generating $@ from $(MANUAL_DOCBOOK_URL)"
88         @curl --silent $(MANUAL_DOCBOOK_URL) | \
89                 sed -e 's/<articleinfo>.*<\/articleinfo>//g' | \
90                 sed -e 's/<section>/\n\n<section>/g' | \
91                 sed -e 's/<\/section>/\n<\/section>/g' | \
92                 sed -e 's/<title>/\n<title>/g' | \
93                 sed -e 's/<para>/\n<para>/g' \
94                 > $@
96 update-manual-from-wiki:
97         @rm $(srcdir)/manual.xml
98         $(MAKE) $(AM_MAKEFLAGS) manual.xml
99         $(MAKE) $(AM_MAKEFLAGS)