]> git.pld-linux.org Git - packages/crossavr-libc.git/blobdiff - 510-avr-libc-enable-xml-doc.patch
- rel 4
[packages/crossavr-libc.git] / 510-avr-libc-enable-xml-doc.patch
diff --git a/510-avr-libc-enable-xml-doc.patch b/510-avr-libc-enable-xml-doc.patch
new file mode 100644 (file)
index 0000000..11710c9
--- /dev/null
@@ -0,0 +1,155 @@
+diff -Naurp configure.ac configure.ac
+--- configure.ac       2012-12-14 15:18:22.000000000 +0530
++++ configure.ac       2012-12-14 19:23:49.000000000 +0530
+@@ -189,6 +189,14 @@ AC_ARG_ENABLE(html-doc,
+   *)   AC_MSG_ERROR(bad value ${enableval} for html-doc option) ;;
+  esac], [html_doc=yes])dnl
++AC_ARG_ENABLE(xml-doc,
++[  --enable-xml-doc        build XML documentation (default)],
++[case "${enableval}" in
++  yes) xml_doc=yes ;;
++  no)  xml_doc=no ;;
++  *)   AC_MSG_ERROR(bad value ${enableval} for xml-doc option) ;;
++ esac], [xml_doc=yes])dnl
++
+ AC_ARG_ENABLE(pdf-doc,
+ [  --enable-pdf-doc        build PDF documentation (default)],
+ [case "${enableval}" in
+@@ -246,6 +254,11 @@ else
+               TARGET_DOX_HTML=dox-html
+               INSTALL_DOX_HTML=install-dox-html
+       fi
++      if test "$xml_doc" = "yes"; then
++              AC_MSG_NOTICE([Enabling XML docs])
++              TARGET_DOX_XML=dox-xml
++              INSTALL_DOX_XML=install-dox-xml
++      fi
+ dnl The creation of man pages is a side-effect of the HTML
+ dnl generation, so a different target is only needed for installation.
+       if test "$man_doc" = "yes"; then
+@@ -257,8 +270,10 @@ fi
+ dnl
+ AC_SUBST(TARGET_DOX_PDF)
+ AC_SUBST(TARGET_DOX_HTML)
++AC_SUBST(TARGET_DOX_XML)
+ AC_SUBST(INSTALL_DOX_PDF)
+ AC_SUBST(INSTALL_DOX_HTML)
++AC_SUBST(INSTALL_DOX_XML)
+ AC_SUBST(INSTALL_DOX_MAN)
+ ])dnl
+diff -Naurp doc/api/doxygen.config.in doc/api/doxygen.config.in
+--- doc/api/doxygen.config.in  2011-12-29 14:21:53.000000000 +0530
++++ doc/api/doxygen.config.in  2012-12-14 19:45:20.000000000 +0530
+@@ -1146,13 +1146,13 @@ MAN_LINKS              = YES
+ # generate an XML file that captures the structure of 
+ # the code including all documentation.
+-GENERATE_XML           = NO
++GENERATE_XML           = YES
+ # The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+ # If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+ # put in front of it. If left blank `xml' will be used as the default path.
+-XML_OUTPUT             = xml
++XML_OUTPUT             = @AVR_LIBC_USER_MANUAL@
+ # The XML_SCHEMA tag can be used to specify an XML schema, 
+ # which can be used by a validating XML parser to check the 
+diff -Naurp doc/api/Makefile.am doc/api/Makefile.am
+--- doc/api/Makefile.am        2011-12-29 14:21:53.000000000 +0530
++++ doc/api/Makefile.am        2012-12-17 14:57:17.000000000 +0530
+@@ -32,7 +32,7 @@
+ #
+ MAINTAINERCLEANFILES = Makefile.in stamp-vti
+-CLEANFILES           = *.html *.pdf *.ma *.mas \
++CLEANFILES           = *.html *.xml *.pdf *.ma *.mas \
+                        *.png *.eps fix_png \
+                        doxygen.config doxygen-pdf.config
+@@ -66,6 +66,7 @@ SUFFIXES             = .pdf .fig .png .e
+ DOC_INST_DIR         = @DOC_INST_DIR@
+ USER_MANUAL          = @AVR_LIBC_USER_MANUAL@
++USER_MANUAL_XML      = @AVR_LIBC_USER_MANUAL@-xml
+ DEMO_LIBS            = $(shell cd $(top_srcdir) && find `pwd` \( -name crtm8.o -o -name exit.o \) -print | grep avr4)
+ # As avr-gcc must have been installed already, we can reference its
+@@ -76,7 +77,7 @@ DEMO_INC             = $(shell cd $(top_
+ # All demo projects where we need to run "make dox" beforehand.
+ DEMOS                = demo largedemo stdiodemo
+-all-local: html pdf
++all-local: html xml pdf
+ # Before we can build the dox, we need to build the demo project so that some
+ # included files get generated.
+@@ -125,12 +126,15 @@ fix_png: $(wildcard $(USER_MANUAL)/*.png
+       done
+       echo timestamp > fix_png
++# Rule for generating XML output
++xml: demo demodox fix_png $(TARGET_DOX_XML)
++
+ # Rule for generating PDF output
+ pdf: demo demodox $(TARGET_DOX_PDF)
+ # General rule for installing documentation
+ install-data-local: $(INSTALL_DOX_HTML) $(INSTALL_DOX_PDF) \
+-      $(INSTALL_DOX_MAN)
++      $(INSTALL_DOX_MAN) $(INSTALL_DOX_XML)
+ uninstall-local:
+       rm -rf $(DOC_INST_DIR)
+@@ -215,6 +219,10 @@ dox-html: demo demodox fix_png $(USER_MA
+ $(USER_MANUAL)/index.html: latex_src/refman.tex
++dox-xml: demo demodox fix_png $(USER_MANUAL)/index.xml
++
++$(USER_MANUAL)/index.xml: latex_src/refman.tex
++
+ dox-pdf: $(USER_MANUAL).pdf
+ $(USER_MANUAL).pdf: latex_src/refman.tex
+@@ -234,6 +242,15 @@ install-dox-html: dox-html
+         $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file; \
+       done
++install-dox-xml: dox-xml
++      $(mkinstalldirs) $(DOC_INST_DIR)/$(USER_MANUAL_XML)
++      @list='$(wildcard $(USER_MANUAL)/*.xml $(USER_MANUAL)/*.css \
++                        $(USER_MANUAL)/*.jpg $(USER_MANUAL)/*.png)'; \
++      for file in $$list ; do \
++        echo " $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$(USER_MANUAL_XML)/"`basename $$file`; \
++        $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$(USER_MANUAL_XML)/`basename $$file`; \
++      done
++
+ install-dox-pdf: dox-pdf
+       $(mkinstalldirs) $(DOC_INST_DIR)
+       $(INSTALL_DATA) $(USER_MANUAL).pdf $(DOC_INST_DIR)/$(USER_MANUAL).pdf
+@@ -242,7 +259,7 @@ install-dox-man: dox-html
+       $(mkinstalldirs) $(DESTDIR)$(mandir)/man3
+       $(INSTALL_DATA) man/man3/*.3 $(DESTDIR)$(mandir)/man3
+-.PHONY: html latex pdf demo demodox \
+-      dox-html dox-pdf install-pdf install-html \
+-      install-dox-html install-dox-pdf \
++.PHONY: html xml latex pdf demo demodox \
++      dox-html dox-xml dox-pdf install-pdf install-html install-xml \
++      install-dox-html install-dox-xml install-dox-pdf \
+       install-dox-man
+diff -Naurp doc/api/tools-install.dox doc/api/tools-install.dox
+--- doc/api/tools-install.dox  2011-12-29 14:21:53.000000000 +0530
++++ doc/api/tools-install.dox  2012-12-14 19:23:49.000000000 +0530
+@@ -613,6 +613,7 @@ Build the tools below in MinGW/MSYS.
+             --enable-doc \
+             --disable-versioned-doc \
+             --enable-html-doc \
++            --enable-xml-doc \
+             --enable-pdf-doc \
+             --enable-man-doc \
+             --mandir=$installdir/man \
This page took 0.106094 seconds and 4 git commands to generate.