2004-12-20 Joerg Wunsch * configure.in: Enable man page building. * doc/api/Makefile.am: (ditto) * doc/api/doxygen.config.in: (ditto) * scripts: new directory * scripts/avr-man.in: Wrapper script for man(1). * scripts/Makefile.am: Link avr-man.in into the build. * Makefile.am: Include the scripts subdir. Index: Makefile.am =================================================================== RCS file: /cvsroot/avr-libc/avr-libc/Makefile.am,v retrieving revision 1.10 diff -u -u -r1.10 Makefile.am --- Makefile.am 10 Nov 2004 19:58:12 -0000 1.10 +++ Makefile.am 20 Dec 2004 21:44:52 -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.132 diff -u -u -r1.132 configure.in --- configure.in 24 Nov 2004 18:57:35 -0000 1.132 +++ configure.in 20 Dec 2004 21:44:52 -0000 @@ -86,15 +86,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)], @@ -206,6 +206,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) @@ -214,6 +220,7 @@ AC_SUBST(INSTALL_DOX_PS) AC_SUBST(INSTALL_DOX_PDF) AC_SUBST(INSTALL_DOX_HTML) +AC_SUBST(INSTALL_DOX_MAN) ])dnl CHECK_DOXYGEN @@ -267,10 +274,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 @@ -446,6 +453,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 20 Dec 2004 21:44:53 -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 20 Dec 2004 21:44:56 -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 Mon Dec 20 22:44:00 2004 +++ scripts/Makefile.am Mon Dec 20 22:39:33 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 Mon Dec 20 22:44:00 2004 +++ scripts/avr-man.in Mon Dec 20 22:39:33 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 "$@"