Index: Makefile.am =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/Makefile.am,v retrieving revision 1.9 diff -u -u -r1.9 Makefile.am --- Makefile.am 4 Jun 2004 16:02:44 -0000 1.9 +++ Makefile.am 19 Sep 2004 13:03:56 -0000 @@ -72,8 +72,8 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) -SUBDIRS = crt1 libc libm @DOCSDIR@ -DIST_SUBDIRS = crt1 libc libm doc +SUBDIRS = crt1 libc libm scripts @DOCSDIR@ +DIST_SUBDIRS = crt1 libc libm doc scripts tooldir = $(exec_prefix)/$(host_alias) toollibdir = $(tooldir)/lib$(MULTISUBDIR) Index: configure.in =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/configure.in,v retrieving revision 1.120 diff -u -u -r1.120 configure.in --- configure.in 10 Sep 2004 21:20:53 -0000 1.120 +++ configure.in 19 Sep 2004 13:02:30 -0000 @@ -81,15 +81,15 @@ 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 +dnl the HTML documentation is built. However, it can be configured +dnl whether the result is about to be installed or not. +AC_ARG_ENABLE(man-doc, +[ --enable-man-doc build Unix-style manual pages (default)], +[case "${enableval}" in + yes) man_doc=yes ;; + no) man_doc=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for man-doc option) ;; + esac], [man_doc=yes])dnl AC_ARG_ENABLE(versioned-doc, [ --enable-versioned-doc install docs in directory with version name (default)], @@ -201,6 +201,12 @@ TARGET_DOX_HTML=dox-html INSTALL_DOX_HTML=install-dox-html 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 + TARGET_DOX_HTML=dox-html + INSTALL_DOX_MAN=install-dox-man + fi fi dnl AC_SUBST(TARGET_DOX_PS) @@ -209,6 +215,7 @@ AC_SUBST(INSTALL_DOX_PS) AC_SUBST(INSTALL_DOX_PDF) AC_SUBST(INSTALL_DOX_HTML) +AC_SUBST(INSTALL_DOX_MAN) ])dnl CHECK_DOXYGEN @@ -262,10 +269,10 @@ CHECK_PNG_UTILS if test "$versioned_doc" = "yes"; then - DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avr-libc-$(VERSION)' + DOC_INST_DIR='${DESTDIR}${datadir}/doc/avr-libc-$(VERSION)' AVR_LIBC_USER_MANUAL="avr-libc-user-manual-${VERSION}" else - DOC_INST_DIR='$(DESTDIR)$(datadir)/doc/avr-libc' + DOC_INST_DIR='${DESTDIR}${datadir}/doc/avr-libc' AVR_LIBC_USER_MANUAL="avr-libc-user-manual" fi @@ -421,6 +428,7 @@ libm/Makefile libm/fplib/Makefile avr-libc.spec doc/Makefile doc/examples/Makefile doc/api/Makefile doc/api/doxygen.config + scripts/Makefile scripts/avr-man Makefile, [if test -n "$CONFIG_FILES"; then . ${avrlib_basedir}/config-ml.in Index: doc/api/Makefile.am =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/doc/api/Makefile.am,v retrieving revision 1.39 diff -u -u -r1.39 Makefile.am --- doc/api/Makefile.am 23 Jul 2004 21:24:38 -0000 1.39 +++ doc/api/Makefile.am 19 Sep 2004 13:02:30 -0000 @@ -108,7 +108,8 @@ pdf: demo $(TARGET_DOX_PDF) # General rule for installing documentation -install-data-local: $(INSTALL_DOX_HTML) $(INSTALL_DOX_PS) $(INSTALL_DOX_PDF) +install-data-local: $(INSTALL_DOX_HTML) $(INSTALL_DOX_PS) $(INSTALL_DOX_PDF) \ + $(INSTALL_DOX_MAN) uninstall-local: rm -rf $(DOC_INST_DIR) @@ -231,6 +232,14 @@ $(mkinstalldirs) $(DOC_INST_DIR) $(INSTALL_DATA) $(USER_MANUAL).ps $(DOC_INST_DIR)/$(USER_MANUAL).ps +install-dox-man: dox-html + $(mkinstalldirs) $(DOC_INST_DIR)/man/man3 + @list='$(wildcard man/man3/*.3)'; \ + for file in $$list ; do \ + echo " $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file"; \ + $(INSTALL_DATA) $$file $(DOC_INST_DIR)/$$file; \ + done .PHONY: html latex ps pdf dox dox-pdf install-pdf install-html install-ps \ - install-dox-html install-dox-ps install-dox-pdf + install-dox-html install-dox-ps install-dox-pdf \ + install-dox-man Index: doc/api/doxygen.config.in =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/doc/api/doxygen.config.in,v retrieving revision 1.12 diff -u -u -r1.12 doxygen.config.in --- doc/api/doxygen.config.in 23 Jul 2004 21:24:39 -0000 1.12 +++ doc/api/doxygen.config.in 19 Sep 2004 13:02:32 -0000 @@ -768,7 +768,7 @@ # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. -MAN_LINKS = NO +MAN_LINKS = YES #--------------------------------------------------------------------------- # configuration options related to the XML output --- /dev/null Sun Sep 19 15:01:51 2004 +++ scripts/Makefile.am Sun Sep 19 14:19:09 2004 @@ -0,0 +1,31 @@ +# Copyright (c) 2004, Joerg Wunsch +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of the copyright holders nor the names of +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +## Process this file with automake to generate Makefile.in + +bin_SCRIPTS = avr-man --- /dev/null Sun Sep 19 15:01:51 2004 +++ scripts/avr-man.in Sun Sep 19 15:06:53 2004 @@ -0,0 +1,37 @@ +#! /bin/sh + +# Copyright (c) 2004, Joerg Wunsch +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of the copyright holders nor the names of +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +## man(1) replacement to access the avr-libc manual pages + +: ${DESTDIR:-} address@hidden@ address@hidden@ + +exec man -M @DOC_INST_DIR@/man "$@"