Makefile.am revision 602434dee543b1d7a0473881469032a05e43106e
1## Process this file with automake to produce Makefile.in
2SUBDIRS=devhelp examples
3
4# The top-level SGML file.
5DOC_MAIN_XML_FILE=gnome-xml.xml
6
7# The directory containing the source code (if it contains documentation).
8DOC_SOURCE_DIR=..
9
10# A file in win32 depends upon one of the doc files
11WIN32_DIR=$(top_srcdir)/win32
12
13PAGES= architecture.html bugs.html contribs.html docs.html DOM.html \
14    downloads.html entities.html example.html help.html index.html \
15    interface.html intro.html library.html namespaces.html news.html \
16    tree.html xmldtd.html XMLinfo.html XSLT.html
17APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
18    APIsymbols.html APIchunk0.html
19EXTRA_DIST=xmlcatalog_man.xml tutorial/*.html tutorial/*.c tutorial/*.pdf \
20           tutorial/images/*.png tutorial/images/callouts/*.png \
21	   API*.html *.1 *.xsl *.html *.gif w3c.png html/*.html \
22	   html/*.png libxml2-api.xml index.py search.php \
23	   apibuild.py libxml2.xsa xmllint.xml xmlcatalog_man.xml \
24	   README.docs
25
26
27man_MANS = xmllint.1 xmlcatalog.1
28
29all: web $(top_builddir)/NEWS libxml2.xsa $(man_MANS)
30
31api: libxml2-api.xml libxml2-refs.xml $(APIPAGES) $(srcdir)/html/index.html $(WIN32_DIR)/libxml2.def.src ../elfgcchack.h
32
33web: $(PAGES)
34
35../elfgcchack.h: $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml
36	-@(if [ -x $(XSLTPROC) ] ; then \
37	  echo "Rebuilding the elfgcchack.h header" ; \
38	  $(XSLTPROC) --nonet $(srcdir)/elfgcchack.xsl $(srcdir)/libxml2-api.xml > elfgcchack.h ; \
39	  if [ "`diff -q elfgcchack.h ../elfgcchack.h`" ] ; then \
40	    echo "updating ../elfgcchack.h"; \
41	    cp elfgcchack.h ../elfgcchack.h; \
42	  fi ; rm -f elfgcchack.h ;  fi );
43
44$(PAGES): xml.html site.xsl
45	-@(if [ -x $(XSLTPROC) ] ; then \
46	  echo "Rebuilding the HTML Web pages from xml.html" ; \
47	  $(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/xml.html > index.html ; fi );
48	-@(if [ -x $(XMLLINT) ] ; then \
49	  echo "Validating the HTML Web pages" ; \
50	  $(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
51
52$(top_builddir)/NEWS: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html
53	-@(if [ -x $(XSLTPROC) ] ; then \
54	  $(XSLTPROC) --nonet $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_builddir)/NEWS ; fi );
55
56libxml2.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html
57	-@(if [ -x $(XSLTPROC) ] ; then \
58	  echo "Rebuilding the NEWS file" ; \
59	  $(XSLTPROC) --nonet $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxml2.xsa ; fi );
60
61$(APIPAGES): libxml2-api.xml libxml2-refs.xml $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/api.xsl
62	-@(if [ -x $(XSLTPROC) ] ; then \
63	  echo "Rebuilding the HTML API pages from libxml2-refs.xml" ; \
64	  $(XSLTPROC) --nonet --html $(top_srcdir)/doc/api.xsl \
65	                     $(top_srcdir)/doc/xml.html ; fi );
66	-@(if [ -x $(XMLLINT) ] ; then \
67	  echo "Validating the HTML API pages" ; \
68	  $(XMLLINT) --nonet --valid --noout API*.html ; fi );
69
70$(srcdir)/html/index.html: libxml2-api.xml $(srcdir)/newapi.xsl
71	-@(if [ -x $(XSLTPROC) ] ; then \
72	  echo "Rebuilding the HTML pages from the XML API" ; \
73	  $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libxml2-api.xml ; fi )
74	-@(if [ -x $(XMLLINT) ] ; then \
75	  echo "Validating the resulting XHTML pages" ; \
76	  $(XMLLINT) --nonet --valid --noout html/*.html ; fi );
77
78wiki: libxml2-api.xml $(srcdir)/wiki.xsl
79	-@(if [ -x $(XSLTPROC) ] ; then \
80		echo "Rebuilding the wiki HTML pages from the XML API" ; \
81		$(XSLTPROC) --nonet $(srcdir)/wiki.xsl libxml2-api.xml; fi )
82
83$(WIN32_DIR)/libxml2.def.src: libxml2-api.xml
84	-@(if [ -x $(XSLTPROC) ] ; then \
85	  $(XSLTPROC) -o $(WIN32_DIR)/libxml2.def.src \
86	  --nonet $(WIN32_DIR)/defgen.xsl libxml2-api.xml ; fi )
87
88libxml2-api.xml libxml2-refs.xml: apibuild.py ../include/libxml/*.h ../*.c
89	-(./apibuild.py)
90	-@(cd .. ; $(MAKE) rebuild_testapi)
91
92
93xmllint.1: xmllint.xml
94	-@($(XSLTPROC) --nonet xmllint.xml)
95
96xmlcatalog.1: xmlcatalog_man.xml
97	-@($(XSLTPROC) --nonet xmlcatalog_man.xml)
98
99clean-local:
100	rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
101
102maintainer-clean-local: clean-local
103	rm -rf libxml-decl-list.txt libxml-decl.txt 
104
105rebuild: api all
106
107install-data-local: 
108	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
109	-@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)$(HTML_DIR)
110	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
111	-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
112	-@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
113	-@INSTALL@ -m 0644 $(srcdir)/html/index.sgml $(DESTDIR)$(HTML_DIR)/html
114	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial
115	-@INSTALL@ -m 0644 $(srcdir)/tutorial/*.* \
116		$(DESTDIR)$(HTML_DIR)/tutorial
117	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial/images
118	-@INSTALL@ -m 0644 $(srcdir)/tutorial/images/*.* \
119		$(DESTDIR)$(HTML_DIR)/tutorial/images
120	$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
121	-@INSTALL@ -m 0644 $(srcdir)/tutorial/images/callouts/*.* \
122		$(DESTDIR)$(HTML_DIR)/tutorial/images/callouts
123
124.PHONY : html xml templates scan
125