Index: configure.in =================================================================== RCS file: /home/cvs/avr-libc/avr-libc/configure.in,v retrieving revision 1.8 diff -u -u -r1.8 configure.in --- configure.in 4 Aug 2002 20:34:36 -0000 1.8 +++ configure.in 4 Aug 2002 20:51:33 -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 -u -r1.8 Makefile.am --- doc/api/Makefile.am 4 Aug 2002 06:09:25 -0000 1.8 +++ doc/api/Makefile.am 4 Aug 2002 20:50:13 -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,7 +45,7 @@ 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) @@ -81,12 +81,30 @@ dox: html latex -dox-html latex: +dox-html latex: doxygen.config doxygen doxygen.config -dox-pdf: latex - cd latex_src && ${MAKE} pdf - cp latex_src/refman.pdf $(USER_MANUAL).pdf +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 + +dox-html: html + +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 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 -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 4 Aug 2002 18:05:58 -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 -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 1 Aug 2002 20:57:37 -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