Makefile.am revision fc60fc200974947e1f42f1e12c178dd1afc0ddd1
1## Process this file with automake to produce Makefile.in
2
3# The name of the module.
4DOC_MODULE=libxml2-$(VERSION)
5
6# The top-level SGML file.
7DOC_MAIN_XML_FILE=gnome-xml.xml
8
9# The directory containing the source code (if it contains documentation).
10DOC_SOURCE_DIR=..
11
12HTML_DIR=$(datadir)/doc
13
14# A file in win32 depends upon one of the doc files
15WIN32_DIR=$(top_srcdir)/win32
16
17TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html
18PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \
19    downloads.html entities.html example.html help.html index.html \
20    interface.html intro.html library.html namespaces.html news.html \
21    tree.html xmldtd.html XMLinfo.html XSLT.html
22APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
23    APIsymbols.html APIchunk0.html
24EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \
25           tutorial/images/*.png tutorial/images/callouts/*.png \
26	   API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \
27	   html/*.png libxml2-api.xml parsedecl.py index.py search.php \
28	   apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
29	   README.docs
30
31
32man_MANS = xmllint.1 xmlcatalog.1
33
34all: $(PAGES) $(top_srcdir)/NEWS libxml2.xsa $(man_MANS)
35
36web: $(PAGES) $(APIPAGES)
37
38$(PAGES): xml.html site.xsl
39	-@(if [ -x $(bindir)/xsltproc ] ; then \
40	  $(bindir)/xsltproc --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/xml.html > index.html ; fi );
41	-@(if [ -x $(bindir)/xmllint ] ; then \
42	  $(bindir)/xmllint --nonet --valid --noout $(PAGES) ; fi );
43
44$(top_srcdir)/NEWS: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html
45	-@(if [ -x $(bindir)/xsltproc ] ; then \
46	  $(bindir)/xsltproc --nonet $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_srcdir)/NEWS ; fi );
47
48libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html
49	-@(if [ -x $(bindir)/xsltproc ] ; then \
50	  $(bindir)/xsltproc --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi );
51
52$(APIPAGES): libxml2-refs.xml site.xsl api.xsl
53	-@(if [ -x $(bindir)/xsltproc ] ; then \
54	  $(bindir)/xsltproc --nonet --html $(top_srcdir)/doc/api.xsl $(top_srcdir)/doc/xml.html ; fi );
55
56xmllint.1: xmllint.xml
57	-@(xsltproc --nonet xmllint.xml)
58
59xmlcatalog.1: xmlcatalog_man.xml
60	-@(xsltproc --nonet xmlcatalog_man.xml)
61
62scan:
63	-gtkdoc-scan --module=libxml --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="acconfig.h config.h win32config.h trio.h triostr.h triop.h config-mac.h XMLTestPrefix2.h  XMLTestPrefix.h triodef.h trionan.h xlink.h libxml.h libxml2-py.h libxml_wrap.h chvalid.h"
64
65templates: scan
66	-gtkdoc-mktmpl --module=libxml
67
68xml: templates
69	if test -d xml ; then rm -f xml/* ; else mkdir xml ; fi
70	-gtkdoc-mkdb --module=libxml --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --main-sgml-file=$(DOC_MAIN_XML_FILE)
71
72
73libxml2-api.xml: apibuild.py ../include/libxml/*.h ../*.c
74	-(./apibuild.py)
75
76$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml
77	-@(if [ -x $(bindir)/xsltproc ] ; then \
78	  $(bindir)/xsltproc -o $(WIN32_DIR)/libxml2.def.src \
79	  --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi )
80
81api: libxml2-api.xml libxml2-refs.xml $(WIN32_DIR)/libxml2.def.src
82
83html:
84	if test -n -d html ; then mkdir html ; fi
85	-cd html && gtkdoc-mkhtml libxml ../$(DOC_MAIN_XML_FILE)
86
87clean-local:
88	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
89
90maintainer-clean-local: clean
91	rm -rf libxml-decl-list.txt libxml-decl.txt 
92
93libxml-decl-list.txt libxml-decl.txt : templates
94
95libxml-sections.txt : scan
96	cp libxml-decl-list.txt libxml-sections.txt
97
98rebuild: libxml-sections.txt templates xml html api
99
100install-data-local: 
101	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
102	-@INSTALL@ -m 0644 $(srcdir)/xml.html $(srcdir)/encoding.html $(srcdir)/FAQ.html $(srcdir)/structure.gif $(srcdir)/DOM.gif $(srcdir)/smallfootonly.gif $(srcdir)/redhat.gif $(srcdir)/libxml.gif $(srcdir)/w3c.png $(srcdir)/Libxml2-Logo-180x168.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(TARGET_DIR)
103	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/html
104	-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(TARGET_DIR)/html
105	-@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(TARGET_DIR)/html
106	-@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR)/html
107	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/tutorial
108	-@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \
109		$(DESTDIR)$(TARGET_DIR)/tutorial
110	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/tutorial/images
111	-@INSTALL@ -m 0644 $(srcdir)/tutorial/images/*.* \
112		$(DESTDIR)$(TARGET_DIR)/tutorial/images
113	$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)/tutorial/images/callouts
114	-@INSTALL@ -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
115		$(DESTDIR)$(TARGET_DIR)/tutorial/images/callouts
116	-(cd $(DESTDIR); gtkdoc-fixxref --module=libxml --html-dir=$(HTML_DIR))
117
118.PHONY : html xml templates scan
119