Imported Upstream version 2.91.2
[platform/upstream/libxml++.git] / docs / Makefile.am
1 ## Copyright (C) 2015  The libxml++ development team
2 ##
3 ## This library is free software; you can redistribute it and/or
4 ## modify it under the terms of the GNU Lesser General Public
5 ## License as published by the Free Software Foundation; either
6 ## version 2.1 of the License, or (at your option) any later version.
7 ##
8 ## This library is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 ## Lesser General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU Lesser General Public License
14 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
15
16 include $(top_srcdir)/libxml++/filelist.am
17
18 book_name = $(LIBXMLXX_MODULE_NAME)
19 doc_input = $(addprefix $(top_srcdir)/libxml++/,$(h_sources_public))
20
21 # Sets dist_noinst_DATA, DISTCLEANFILES and MAINTAINERCLEANFILES
22 include $(top_srcdir)/build/doc-reference.am
23
24 manual/libxml++.xml: manual/libxml++_without_code.xml manual/insert_example_code.pl
25         $(AM_V_GEN)$(PERL) -- manual/insert_example_code.pl ../examples $< >$@
26
27 manualdir = $(docdir)/manual
28 manual_htmldir = $(manualdir)/html
29 manual_html_files = $(wildcard manual/html/*.html)
30
31 manual/html/index.html: manual/libxml++.xml manual/docbook-customisation.xsl
32         $(AM_V_at)rm -fr manual/html
33         $(AM_V_at)$(MKDIR_P) manual/html
34         $(AM_V_GEN)$(XSLTPROC) -o manual/html/ --xinclude --catalogs \
35                 $(top_srcdir)/docs/manual/docbook-customisation.xsl $<
36
37 manual/libxml++.pdf: manual/libxml++.xml
38         $(AM_V_GEN)$(DB2LATEX) -o $@ -O manual -tpdf $<
39
40 validate_original_manual: manual/libxml++_without_code.xml
41         $(XMLLINT) --xinclude --postvalid --noout $<
42
43 validate_manual: manual/libxml++.xml
44         $(XMLLINT) --xinclude --postvalid --noout $<
45
46 all-local: manual/html/index.html
47
48 dist_noinst_DATA += \
49         manual/docbook-customisation.xsl \
50         $(manual_html_files) \
51         manual/libxml++.xml \
52         manual/libxml++_without_code.xml
53
54 dist_noinst_SCRIPTS = \
55         manual/insert_example_code.pl
56
57 MAINTAINERCLEANFILES += manual/html/*.html
58
59 # Make it easy to upload to the sourceforge web site.
60 # The manual and API reference are hosted on developer.gnome.org via tarball releases.
61 web_path_project = /home/groups/l/li/libxmlplusplus/htdocs/
62 rsync_args = -vz --rsh ssh --recursive --cvs-exclude --exclude="**1.0**" --exclude=".gitignore" --exclude="Makefile" --exclude="Makefile.in" --exclude=".deps" --exclude=".libs"
63
64 ## TODO: When I moved this code from libxml++/Makefile.am to libxml++/docs/Makefile.am,
65 ## I changed the relative paths accordingly (docs/index.html -> index.html,
66 ## examples -> ../examples). I don't know if that changes the location where the files
67 ## are stored at sourceforge.net. If necessary, change again before you use 'make post-html'.
68 ## Why are the examples copied to sourceforge? / 2015-09-11 Kjell Ahlstedt
69 post-html: index.html
70         rsync $(rsync_args) -r index.html $$USER,libxmlplusplus@web.sourceforge.net:$(web_path_project)
71         rsync $(rsync_args) -r ../examples $$USER,libxmlplusplus@web.sourceforge.net:$(web_path_project)