1 diff -Naurp configure.ac configure.ac
2 --- configure.ac 2012-12-14 15:18:22.000000000 +0530
3 +++ configure.ac 2012-12-14 19:23:49.000000000 +0530
4 @@ -189,6 +189,14 @@ AC_ARG_ENABLE(html-doc,
5 *) AC_MSG_ERROR(bad value ${enableval} for html-doc option) ;;
6 esac], [html_doc=yes])dnl
8 +AC_ARG_ENABLE(xml-doc,
9 +[ --enable-xml-doc build XML documentation (default)],
10 +[case "${enableval}" in
13 + *) AC_MSG_ERROR(bad value ${enableval} for xml-doc option) ;;
14 + esac], [xml_doc=yes])dnl
16 AC_ARG_ENABLE(pdf-doc,
17 [ --enable-pdf-doc build PDF documentation (default)],
18 [case "${enableval}" in
19 @@ -246,6 +254,11 @@ else
20 TARGET_DOX_HTML=dox-html
21 INSTALL_DOX_HTML=install-dox-html
23 + if test "$xml_doc" = "yes"; then
24 + AC_MSG_NOTICE([Enabling XML docs])
25 + TARGET_DOX_XML=dox-xml
26 + INSTALL_DOX_XML=install-dox-xml
28 dnl The creation of man pages is a side-effect of the HTML
29 dnl generation, so a different target is only needed for installation.
30 if test "$man_doc" = "yes"; then
31 @@ -257,8 +270,10 @@ fi
33 AC_SUBST(TARGET_DOX_PDF)
34 AC_SUBST(TARGET_DOX_HTML)
35 +AC_SUBST(TARGET_DOX_XML)
36 AC_SUBST(INSTALL_DOX_PDF)
37 AC_SUBST(INSTALL_DOX_HTML)
38 +AC_SUBST(INSTALL_DOX_XML)
39 AC_SUBST(INSTALL_DOX_MAN)
42 diff -Naurp doc/api/doxygen.config.in doc/api/doxygen.config.in
43 --- doc/api/doxygen.config.in 2011-12-29 14:21:53.000000000 +0530
44 +++ doc/api/doxygen.config.in 2012-12-14 19:45:20.000000000 +0530
45 @@ -1146,13 +1146,13 @@ MAN_LINKS = YES
46 # generate an XML file that captures the structure of
47 # the code including all documentation.
52 # The XML_OUTPUT tag is used to specify where the XML pages will be put.
53 # If a relative path is entered the value of OUTPUT_DIRECTORY will be
54 # put in front of it. If left blank `xml' will be used as the default path.
57 +XML_OUTPUT = @AVR_LIBC_USER_MANUAL@
59 # The XML_SCHEMA tag can be used to specify an XML schema,
60 # which can be used by a validating XML parser to check the
61 diff -Naurp doc/api/Makefile.am doc/api/Makefile.am
62 --- doc/api/Makefile.am 2011-12-29 14:21:53.000000000 +0530
63 +++ doc/api/Makefile.am 2012-12-17 14:57:17.000000000 +0530
66 MAINTAINERCLEANFILES = Makefile.in stamp-vti
68 -CLEANFILES = *.html *.pdf *.ma *.mas \
69 +CLEANFILES = *.html *.xml *.pdf *.ma *.mas \
71 doxygen.config doxygen-pdf.config
73 @@ -66,6 +66,7 @@ SUFFIXES = .pdf .fig .png .e
74 DOC_INST_DIR = @DOC_INST_DIR@
76 USER_MANUAL = @AVR_LIBC_USER_MANUAL@
77 +USER_MANUAL_XML = @AVR_LIBC_USER_MANUAL@-xml
79 DEMO_LIBS = $(shell cd $(top_srcdir) && find `pwd` \( -name crtm8.o -o -name exit.o \) -print | grep avr4)
80 # As avr-gcc must have been installed already, we can reference its
81 @@ -76,7 +77,7 @@ DEMO_INC = $(shell cd $(top_
82 # All demo projects where we need to run "make dox" beforehand.
83 DEMOS = demo largedemo stdiodemo
86 +all-local: html xml pdf
88 # Before we can build the dox, we need to build the demo project so that some
89 # included files get generated.
90 @@ -125,12 +126,15 @@ fix_png: $(wildcard $(USER_MANUAL)/*.png
92 echo timestamp > fix_png
94 +# Rule for generating XML output
95 +xml: demo demodox fix_png $(TARGET_DOX_XML)
97 # Rule for generating PDF output
98 pdf: demo demodox $(TARGET_DOX_PDF)
100 # General rule for installing documentation
101 install-data-local: $(INSTALL_DOX_HTML) $(INSTALL_DOX_PDF) \
103 + $(INSTALL_DOX_MAN) $(INSTALL_DOX_XML)
106 rm -rf $(DOC_INST_DIR)
107 @@ -215,6 +219,10 @@ dox-html: demo demodox fix_png $(USER_MA
109 $(USER_MANUAL)/index.html: latex_src/refman.tex
111 +dox-xml: demo demodox fix_png $(USER_MANUAL)/index.xml
113 +$(USER_MANUAL)/index.xml: latex_src/refman.tex
115 dox-pdf: $(USER_MANUAL).pdf
117 $(USER_MANUAL).pdf: latex_src/refman.tex
118 @@ -234,6 +242,15 @@ install-dox-html: dox-html
119 $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file; \
122 +install-dox-xml: dox-xml
123 + $(mkinstalldirs) $(DOC_INST_DIR)/$(USER_MANUAL_XML)
124 + @list='$(wildcard $(USER_MANUAL)/*.xml $(USER_MANUAL)/*.css \
125 + $(USER_MANUAL)/*.jpg $(USER_MANUAL)/*.png)'; \
126 + for file in $$list ; do \
127 + echo " $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$(USER_MANUAL_XML)/"`basename $$file`; \
128 + $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$(USER_MANUAL_XML)/`basename $$file`; \
131 install-dox-pdf: dox-pdf
132 $(mkinstalldirs) $(DOC_INST_DIR)
133 $(INSTALL_DATA) $(USER_MANUAL).pdf $(DOC_INST_DIR)/$(USER_MANUAL).pdf
134 @@ -242,7 +259,7 @@ install-dox-man: dox-html
135 $(mkinstalldirs) $(DESTDIR)$(mandir)/man3
136 $(INSTALL_DATA) man/man3/*.3 $(DESTDIR)$(mandir)/man3
138 -.PHONY: html latex pdf demo demodox \
139 - dox-html dox-pdf install-pdf install-html \
140 - install-dox-html install-dox-pdf \
141 +.PHONY: html xml latex pdf demo demodox \
142 + dox-html dox-xml dox-pdf install-pdf install-html install-xml \
143 + install-dox-html install-dox-xml install-dox-pdf \
145 diff -Naurp doc/api/tools-install.dox doc/api/tools-install.dox
146 --- doc/api/tools-install.dox 2011-12-29 14:21:53.000000000 +0530
147 +++ doc/api/tools-install.dox 2012-12-14 19:23:49.000000000 +0530
148 @@ -613,6 +613,7 @@ Build the tools below in MinGW/MSYS.
150 --disable-versioned-doc \
155 --mandir=$installdir/man \