diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-09-19 12:35:01 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-09-19 12:47:03 +0300 |
commit | f32ef1983968e755cd580b06e369476d7e7f88b6 (patch) | |
tree | d33efa81946df4e116abe40268ee662a51af3406 | |
parent | 999cefa29eeffcb380ac40a010321d65bf72f8d5 (diff) | |
download | imprimatur-f32ef1983968e755cd580b06e369476d7e7f88b6.tar.gz imprimatur-f32ef1983968e755cd580b06e369476d7e7f88b6.tar.bz2 |
Redo handling of the makedoc option.
* .gitignore: Add Makedoc
* Makedoc.am: New file.
* Makefile.am [IMPRIMATUR_COND_MAKEDOC]: Provide a set of shortcuts
for make -f Makedoc.
* imprimatur.m4 (IMPRIMATUR_INIT): Create Makedoc file if
`makedoc' option is given.
New option dist-info.
* imprimatur.texi: Update.
* README: Update.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makedoc.am | 65 | ||||
-rw-r--r-- | Makefile.am | 66 | ||||
-rw-r--r-- | README | 8 | ||||
-rw-r--r-- | imprimatur.m4 | 16 | ||||
-rw-r--r-- | imprimatur.texi | 38 |
6 files changed, 127 insertions, 68 deletions
@@ -2,6 +2,8 @@ *~ Makefile Makefile.in +Makedoc +Makedoc.in imprimatur.info* imprimatur.pdf imprimatur.dvi diff --git a/Makedoc.am b/Makedoc.am new file mode 100644 index 0000000..71dae1c --- /dev/null +++ b/Makedoc.am @@ -0,0 +1,65 @@ +# This file is part of Imprimatur. +# Copyright (C) 2011 Sergey Poznyakoff +# +# Imprimatur is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# Imprimatur is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Imprimatur. If not, see <http://www.gnu.org/licenses/>. + +info_TEXINFOS=imprimatur.texi +imprimatur_TEXINFOS=rendition.texi fdl.texi + +TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E + +clean-local: + @rm -rf manual + +AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ +imprimatur_INPUT=$(info_TEXINFOS) $(imprimatur_TEXINFOS) +include imprimatur.mk +CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh + +check-rules: + @$(CHECK_DOCS) "Makefile rules" \ + '/^imprimatur-.*:/s/:.*//p' \ + 's/@deffn {Makefile Rule} *//p' \ + imprimatur.mk -- \ + $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ + $(info_TEXINFOS) + +check-macros: + @$(CHECK_DOCS) "Texinfo macros" \ + '/@macro/s/@macro *\([-a-zA-Z][-a-zA-Z0-9]*\).*/\1/p' \ + '/@defmac/s/@defmac *\([-a-zA-Z][-a-zA-Z0-9]*\).*/\1/p' \ + rendition.texi -- \ + $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ + $(info_TEXINFOS) + +check-docs-am: imprimatur-basic-checks check-rules check-macros + +check-docs: + $(MAKE) -k check-docs-am + +GENDOCS=gendocs.sh + +.PHONY: manual +manual: + TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \ + MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS) $(AM_MAKEINFOFLAGS)" \ + TEXI2DVI="$(TEXI2DVI)" \ + TEXI2HTML="$(TEXI2HTML)" \ + GENDOCS_TEMPLATE_DIR="$(GENDOCS_TEMPLATE_DIR)" \ + $(GENDOCS) --texi2html imprimatur 'Imprimatur manual' + +manual.tar.bz2: manual + tar cfj manual.tar.bz2 manual + +man-tar: manual.tar.bz2 diff --git a/Makefile.am b/Makefile.am index 79f00de..495cde2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,58 +23,18 @@ EXTRA_DIST=\ rendition.texi\ untabify.el -info_TEXINFOS= -TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E - if IMPRIMATUR_COND_MAKEDOC -EXTRA_DIST+=imprimatur.texi -# FIXME: How about gendocs_template? - -info_TEXINFOS+=imprimatur.texi -imprimatur_TEXINFOS=rendition.texi fdl.texi - -clean-local: - @rm -rf manual - -AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ -imprimatur_INPUT=$(info_TEXINFOS) $(imprimatur_TEXINFOS) -include imprimatur.mk -CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh - -check-rules: - @$(CHECK_DOCS) "Makefile rules" \ - '/^imprimatur-.*:/s/:.*//p' \ - 's/@deffn {Makefile Rule} *//p' \ - imprimatur.mk -- \ - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ - $(info_TEXINFOS) - -check-macros: - @$(CHECK_DOCS) "Texinfo macros" \ - '/@macro/s/@macro *\([-a-zA-Z][-a-zA-Z0-9]*\).*/\1/p' \ - '/@defmac/s/@defmac *\([-a-zA-Z][-a-zA-Z0-9]*\).*/\1/p' \ - rendition.texi -- \ - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \ - $(info_TEXINFOS) - -check-docs-am: imprimatur-basic-checks check-rules check-macros - -check-docs: - $(MAKE) -k check-docs-am - -GENDOCS=gendocs.sh - -.PHONY: manual -manual: - TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \ - MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS) $(AM_MAKEINFOFLAGS)" \ - TEXI2DVI="$(TEXI2DVI)" \ - TEXI2HTML="$(TEXI2HTML)" \ - GENDOCS_TEMPLATE_DIR="$(GENDOCS_TEMPLATE_DIR)" \ - $(GENDOCS) --texi2html imprimatur 'Imprimatur manual' - -manual.tar.bz2: manual - tar cfj manual.tar.bz2 manual - -man-tar: manual.tar.bz2 +if IMPRIMATUR_COND_DIST_INFO +EXTRA_DIST += imprimatur.info +BUILT_SOURCES = imprimatur.info +endif +DISTCLEANFILES = Makedoc +MAKEDOC = $(MAKE) -f Makedoc +EXTRA_DIST += Makedoc.am Makedoc.in imprimatur.texi fdl.texi +imprimatur.info:; $(MAKEDOC) +info: imprimatur.info +pdf:; $(MAKEDOC) pdf +dvi:; $(MAKEDOC) dvi +ps:; $(MAKEDOC) ps +clean-local:; $(MAKEDOC) clean endif
\ No newline at end of file @@ -9,12 +9,10 @@ Imprimatur. It is *not* intended as a replacement for the documentation, and is provided as a brief reference only. The complete documentation in Texinfo format is included. To build it, change to the imprimatur subdirectory and run `makeinfo -imprimatur'. Once the package is properly installed (see below), you -can use the `make' command to create documentation in various formats. -For example, `make' without arguments will create `imprimatur.info', -`make pdf' will create `imprimatur.pdf', etc. +imprimatur'. -Complete documentation is available online at the following URL: +Complete documentation in various formats is available online from the +following URL: http://www.gnu.org.ua/software/imprimatur/manual diff --git a/imprimatur.m4 b/imprimatur.m4 index 990009c..7bb8a98 100644 --- a/imprimatur.m4 +++ b/imprimatur.m4 @@ -58,14 +58,14 @@ AC_DEFUN([_IMPRIMATUR_SET_OPTIONS], # DIR - Directory in the source tree where imprimatur has been cloned. # Default is "imptimatur". # OPTIONS - A whitespace-separated list of options. Valid options are: -# any one of PROOF, DISTRIB or PUBLISH to set the default -# rendition, frenchspacing to declare that French sentence -# spacing should be assumed, and makedoc to enable rules for -# building imprimatur documentation. +# (1) any one of PROOF, DISTRIB or PUBLISH to set the default +# rendition, (2) frenchspacing to declare that French sentence +# spacing should be assumed, (3) makedoc to enable rules for +# building imprimatur documentation, and (4) dist-info to +# build and distribute imprimatur.info file (requires makedoc). AC_DEFUN([IMPRIMATUR_INIT],[ m4_pushdef([imprimaturdir],[m4_if([$1],,[imprimatur],[$1])]) AC_SUBST([IMPRIMATUR_MODULE_DIR],imprimaturdir) - AC_CONFIG_FILES(imprimaturdir[/Makefile]) _IMPRIMATUR_SET_OPTIONS([$2]) AC_SUBST(RENDITION) _IMPRIMATUR_OPTION_SWITCH([PROOF],[RENDITION=PROOF], @@ -94,5 +94,11 @@ AC_DEFUN([IMPRIMATUR_INIT],[ [_IMPRIMATUR_IF_OPTION_SET([makedoc],[true],[false])]) AM_CONDITIONAL([IMPRIMATUR_COND_FRENCHSPACING], [_IMPRIMATUR_IF_OPTION_SET([frenchspacing],[true],[false])]) + AM_CONDITIONAL([IMPRIMATUR_COND_DIST_INFO], + [_IMPRIMATUR_IF_OPTION_SET([dist-info],[true],[false])]) + AC_CONFIG_FILES(imprimaturdir[/Makefile]) + AM_COND_IF([IMPRIMATUR_COND_MAKEDOC],dnl + [AC_CONFIG_FILES(imprimaturdir[/Makedoc])]) + m4_popdef([imprimaturdir]) ]) diff --git a/imprimatur.texi b/imprimatur.texi index 1229a01..7449fca 100644 --- a/imprimatur.texi +++ b/imprimatur.texi @@ -7,7 +7,7 @@ @c The UPDATED date is updated automatically by the Emacs magic at the @c end of this file. -@set UPDATED 18 September 2011 +@set UPDATED 19 September 2011 @set VERSION 1.0 @c This document contains examples of all the rendition macros, so it @@ -538,10 +538,38 @@ document. @xref{imprimatur-check-sentence-spacing}. @end defvr @defvr {Option} makedoc -Enables Makefile rules for building @command{Imprimatur} -documentation. This is intended mostly for @command{Imprimatur} -maintainers, but you may use this option to build your own, perhaps -customized, copies of this manual. +@flindex Makedoc +Enables creation of a separate makefile for building +@command{Imprimatur} documentation. This file is called +@file{Makedoc} and contains rules for building this manual in various +output formats. With this option on, the @file{Makefile} in the +@file{imprimatur} subdirectory will also contain several additional +shortcut rules, namely: + +@table @option +@item make info +@itemx make imprimatur.info +Creates the manual in info format (a shortcut for @command{make -f +Makedoc imprimatur.info}). + +@item make pdf +Creates a PDF output (a shortcut for @command{make -f Makedoc pfd}). + +@item make dvi +Creates a DVI output. + +@item make ps +Creates a PostScript output. +@end table + +This is intended mostly for @command{Imprimatur} maintainers, but you +may use this option to build your own, perhaps customized, copies of +this manual. +@end defvr + +@defvr {Option} dist-info +Distribute the @file{imprimatur.info} file. This option is valid only +in conjunction with @option{makedoc}. @end defvr @end deffn |