]> git.pld-linux.org Git - packages/crossavr-libc.git/blame - 510-avr-libc-enable-xml-doc.patch
- rel 4
[packages/crossavr-libc.git] / 510-avr-libc-enable-xml-doc.patch
CommitLineData
69ed15f0
JR
1diff -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
7
8+AC_ARG_ENABLE(xml-doc,
9+[ --enable-xml-doc build XML documentation (default)],
10+[case "${enableval}" in
11+ yes) xml_doc=yes ;;
12+ no) xml_doc=no ;;
13+ *) AC_MSG_ERROR(bad value ${enableval} for xml-doc option) ;;
14+ esac], [xml_doc=yes])dnl
15+
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
22 fi
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
27+ fi
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
32 dnl
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)
40 ])dnl
41
42diff -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.
48
49-GENERATE_XML = NO
50+GENERATE_XML = YES
51
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.
55
56-XML_OUTPUT = xml
57+XML_OUTPUT = @AVR_LIBC_USER_MANUAL@
58
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
61diff -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
64@@ -32,7 +32,7 @@
65 #
66 MAINTAINERCLEANFILES = Makefile.in stamp-vti
67
68-CLEANFILES = *.html *.pdf *.ma *.mas \
69+CLEANFILES = *.html *.xml *.pdf *.ma *.mas \
70 *.png *.eps fix_png \
71 doxygen.config doxygen-pdf.config
72
73@@ -66,6 +66,7 @@ SUFFIXES = .pdf .fig .png .e
74 DOC_INST_DIR = @DOC_INST_DIR@
75
76 USER_MANUAL = @AVR_LIBC_USER_MANUAL@
77+USER_MANUAL_XML = @AVR_LIBC_USER_MANUAL@-xml
78
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
84
85-all-local: html pdf
86+all-local: html xml pdf
87
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
91 done
92 echo timestamp > fix_png
93
94+# Rule for generating XML output
95+xml: demo demodox fix_png $(TARGET_DOX_XML)
96+
97 # Rule for generating PDF output
98 pdf: demo demodox $(TARGET_DOX_PDF)
99
100 # General rule for installing documentation
101 install-data-local: $(INSTALL_DOX_HTML) $(INSTALL_DOX_PDF) \
102- $(INSTALL_DOX_MAN)
103+ $(INSTALL_DOX_MAN) $(INSTALL_DOX_XML)
104
105 uninstall-local:
106 rm -rf $(DOC_INST_DIR)
107@@ -215,6 +219,10 @@ dox-html: demo demodox fix_png $(USER_MA
108
109 $(USER_MANUAL)/index.html: latex_src/refman.tex
110
111+dox-xml: demo demodox fix_png $(USER_MANUAL)/index.xml
112+
113+$(USER_MANUAL)/index.xml: latex_src/refman.tex
114+
115 dox-pdf: $(USER_MANUAL).pdf
116
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; \
120 done
121
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`; \
129+ done
130+
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
137
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 \
144 install-dox-man
145diff -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.
149 --enable-doc \
150 --disable-versioned-doc \
151 --enable-html-doc \
152+ --enable-xml-doc \
153 --enable-pdf-doc \
154 --enable-man-doc \
155 --mandir=$installdir/man \
This page took 0.075149 seconds and 4 git commands to generate.