Index: configure.in =================================================================== RCS file: /home/cvs/avr-libc/avr-libc/configure.in,v retrieving revision 1.8 diff -u -r1.8 configure.in --- configure.in 4 Aug 2002 20:34:36 -0000 1.8 +++ configure.in 5 Aug 2002 12:15:39 -0000 @@ -38,6 +38,43 @@ *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;; esac], [multilib=yes])dnl +dnl Various documentation options. By default, we enable all of them, +dnl i. e. HTML, Postscript, PDF, and Unix-style man pages. +AC_ARG_ENABLE(html-doc, +[ --enable-html-doc build HTML documentation (default)], +[case "${enableval}" in + yes) html_doc=yes ;; + no) html_doc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for html-doc option) ;; + esac], [html_doc=yes])dnl + +AC_ARG_ENABLE(ps-doc, +[ --enable-ps-doc build Postscript documentation (default)], +[case "${enableval}" in + yes) ps_doc=yes ;; + no) ps_doc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for ps-doc option) ;; + esac], [ps_doc=yes])dnl + +AC_ARG_ENABLE(pdf-doc, +[ --enable-pdf-doc build PDF documentation (default)], +[case "${enableval}" in + yes) pdf_doc=yes ;; + no) pdf_doc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for pdf-doc option) ;; + esac], [pdf_doc=yes])dnl + +dnl Man pages are currently not tunable; they'll be built whenever +dnl the HTML documentation is built. +dnl +dnl AC_ARG_ENABLE(man-doc, +dnl [ --enable-man-doc build Unix-style manual pages (default)], +dnl [case "${enableval}" in +dnl yes) man_doc=yes ;; +dnl no) man_doc=no ;; +dnl *) AC_MSG_ERROR(bad value ${enableval} for man-doc option) ;; +dnl esac], [man_doc=yes])dnl + if test "${target}" = "NONE"; then target=avr fi @@ -125,12 +162,18 @@ else # FIXME: should also check for dox_ver >= 1.2.16 AC_MSG_RESULT(yes) - TARGET_DOX_PS=dox-ps - TARGET_DOX_PDF=dox-pdf - TARGET_DOX_HTML=dox-html - INSTALL_DOX_PS=install-dox-ps - INSTALL_DOX_PDF=install-dox-pdf - INSTALL_DOX_HTML=install-dox-html + if test "$ps_doc" = "yes"; then + TARGET_DOX_PS=dox-ps + INSTALL_DOX_PS=install-dox-ps + fi + if test "$pdf_doc" = "yes"; then + TARGET_DOX_PDF=dox-pdf + INSTALL_DOX_PDF=install-dox-pdf + fi + if test "$html_doc" = "yes"; then + TARGET_DOX_HTML=dox-html + INSTALL_DOX_HTML=install-dox-html + fi fi dnl AC_SUBST(TARGET_DOX_PS) Index: doc/api/Makefile.am =================================================================== RCS file: /home/cvs/avr-libc/avr-libc/doc/api/Makefile.am,v retrieving revision 1.8 diff -u -r1.8 Makefile.am --- doc/api/Makefile.am 4 Aug 2002 06:09:25 -0000 1.8 +++ doc/api/Makefile.am 5 Aug 2002 12:15:39 -0000 @@ -32,7 +32,7 @@ # MAINTAINERCLEANFILES = Makefile.in stamp-vti -CLEANFILES = *.html *.pdf *.ma *.mas *.ps +CLEANFILES = *.html *.pdf *.ma *.mas *.ps doxygen-pdf.config EXTRA_DIST = dox.css dox_html_header dox_html_footer \ main_page.dox \ @@ -45,54 +45,68 @@ USER_MANUAL = @AVR_LIBC_USER_MANUAL@ -all-local: ps html $(TARGET_PDF) +all-local: ps html pdf # Rule for generating postscript output. ps: $(TARGET_DOX_PS) -install-ps: ps $(INSTALL_DOX_PS) - $(mkinstalldirs) $(DOC_INST_DIR) - $(INSTALL_DATA) $(USER_MANUAL).ps $(DOC_INST_DIR)/$(USER_MANUAL).ps - # Rule for generating html output. html: $(TARGET_DOX_HTML) -install-html: $(INSTALL_DOX_HTML) +# Rule for generating PDF output +pdf: $(TARGET_DOX_PDF) # General rule for installing documentation -install-data-local: install-html install-ps $(INSTALL_PDF) +install-data-local: $(INSTALL_DOX_HTML) $(INSTALL_DOX_PS) $(INSTALL_DOX_PDF) uninstall-local: rm -rf $(DOC_INST_DIR) clean-local: - rm -rf $(USER_MANUAL) latex_src man - -# Rule for generating PDF output -pdf: $(TARGET_DOX_PDF) - -install-pdf: $(INSTALL_DOX_PDF) - $(mkinstalldirs) $(DOC_INST_DIR) - $(INSTALL_DATA) $(USER_MANUAL).pdf $(DOC_INST_DIR)/$(USER_MANUAL).pdf + rm -rf $(USER_MANUAL) latex_src latex_pdf_src man # # Rules for generating documentation with doxygen # -dox: html latex - -dox-html latex: +latex: doxygen.config doxygen doxygen.config - -dox-pdf: latex - cd latex_src && ${MAKE} pdf - cp latex_src/refman.pdf $(USER_MANUAL).pdf + cd latex_src && \ + sed -e '/tocdepth/s/1/2/' refman.tex > tmp.$$ && \ + mv -f tmp.$$ refman.tex + +latex-pdf: doxygen-pdf.config + doxygen doxygen-pdf.config + cd latex_pdf_src && \ + sed -e '/tocdepth/s/1/3/' refman.tex > tmp.$$ && \ + mv -f tmp.$$ refman.tex + +doxygen-pdf.config: doxygen.config + sed \ + -e '/USE_PDFLATEX/s/NO/YES/' \ + -e '/LATEX_OUTPUT/s/latex_src/latex_pdf_src/' \ + -e '/GENERATE_HTML/s/YES/NO/' \ + -e '/GENERATE_MAN/s/YES/NO/' \ + doxygen.config > doxygen-pdf.config + +# XXX currently, HTML and LaTeX documentation will always be built +# together. HTML doesn't need any postprocessing, while latex is only +# a prerequisite for ps. +dox-html: latex + +dox-pdf: latex-pdf + cd latex_pdf_src && ${MAKE} refman.pdf + cp latex_pdf_src/refman.pdf $(USER_MANUAL).pdf dox-ps: latex cd latex_src && ${MAKE} ps cp latex_src/refman.ps $(USER_MANUAL).ps -install-dox-html: html +# Install rules for the various documentation parts. The actual +# access to those rules is from the install-data-local target above, +# where the toplevel configure decides which of them will become a +# prerequisite of install-data-local. +install-dox-html: dox-html $(mkinstalldirs) $(DOC_INST_DIR)/$(USER_MANUAL) @list='$(wildcard $(USER_MANUAL)/*.html $(USER_MANUAL)/*.css)'; \ for file in $$list ; do \ @@ -102,11 +116,12 @@ install-dox-pdf: dox-pdf $(mkinstalldirs) $(DOC_INST_DIR) - $(INSTALL_DATA) latex_src/refman.pdf $(DOC_INST_DIR)/$(USER_MANUAL).pdf + $(INSTALL_DATA) $(USER_MANUAL).pdf $(DOC_INST_DIR)/$(USER_MANUAL).pdf install-dox-ps: dox-ps $(mkinstalldirs) $(DOC_INST_DIR) - $(INSTALL_DATA) latex_src/refman.ps $(DOC_INST_DIR)/$(USER_MANUAL).ps + $(INSTALL_DATA) $(USER_MANUAL).ps $(DOC_INST_DIR)/$(USER_MANUAL).ps + .PHONY: html latex ps pdf dox dox-pdf install-pdf install-html install-ps \ install-dox-html install-dox-ps install-dox-pdf Index: doc/api/doxygen.config.in =================================================================== RCS file: /home/cvs/avr-libc/avr-libc/doc/api/doxygen.config.in,v retrieving revision 1.5 diff -u -r1.5 doxygen.config.in --- doc/api/doxygen.config.in 4 Aug 2002 06:09:25 -0000 1.5 +++ doc/api/doxygen.config.in 5 Aug 2002 12:15:39 -0000 @@ -603,7 +603,7 @@ # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. -USE_PDFLATEX = YES +USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep Index: doc/api/inline_asm.dox =================================================================== RCS file: /home/cvs/avr-libc/avr-libc/doc/api/inline_asm.dox,v retrieving revision 1.2 diff -u -r1.2 inline_asm.dox --- doc/api/inline_asm.dox 1 Aug 2002 15:09:42 -0000 1.2 +++ doc/api/inline_asm.dox 5 Aug 2002 12:15:40 -0000 @@ -83,7 +83,7 @@ - 2002/07/23: Converted to doxygen and merged into avr-libc project by Theodore A. Roth. -\section gcc_asm GCC asm Statement +\subsection gcc_asm GCC asm Statement Let's start with a simple example of reading a value from port D: @@ -157,7 +157,7 @@ asm volatile("cli"::); \endcode -\section asm_code Assembler Code +\subsection asm_code Assembler Code You can use the same assembler instruction mnemonics, as you'd use with any other AVR assembler. And you can write as many assembler statements into one @@ -217,7 +217,7 @@ \c __zero_reg__ instead of \c r0 or \c r1, just in case a new compiler version might change the register definitions. -\section io_ops Input and Output Operands +\subsection io_ops Input and Output Operands Each input and output operand is described by a constraint string followed by a C expression in parantheses. GCC-AVR 2.95.2 knows the following constraint @@ -714,7 +714,7 @@ with a lower case a following the percent sign, then the compiler will create the proper assembler line. -\section clobbers Clobbers +\subsection clobbers Clobbers As stated previously, the last part of the \c asm statement, the list of clobbers, may be omitted, including the colon seperator. However, if you are @@ -832,7 +832,7 @@ values before and reload them after your assembler code. Avoiding them, enables the full optimization power. -\section asm_macros Assembler Macros +\subsection asm_macros Assembler Macros In order to reuse your assembler language parts, it is useful to define them as macros and put them into include files. AVR Libc comes with a bunch of @@ -862,7 +862,7 @@ usage might create \c L_1405 or whatever. In any case, the labels became unique too. -\section c_names_in_asm C Names Used in Assembler Code +\subsection c_names_in_asm C Names Used in Assembler Code By default GCC-AVR uses the same symbolic names of functions or variables in C and assembler code. You can specify a different name for the assembler code by @@ -909,9 +909,9 @@ Calling the function \c Calc() will create assembler instructions to call the function \c CALCULATE. -\section inlasm_faq Frequently Answered Questions +\subsection inlasm_faq Frequently Answered Questions -\subsection constants Using Constants +- Using Constants \b Question: When I do the following: @@ -944,7 +944,7 @@ Note, that \c iomacros.h already provides a \c sbi() macro definition, which can be used in C programs. -\section links Links +\subsection links Links A GNU Development Environment for the AVR Microcontroller covers the details of the GNU Tools that are specific to the AVR family of