aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-10-08 01:48:19 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-10-08 01:48:19 +0300
commit50c7e46cea1b1f24079651ebf68521f0e1815995 (patch)
treecece584fed0b064fd9b8a7fcf71fc3ea03640357
parente652629b1e5f63911397101c67f4ddac94d36140 (diff)
downloaddico-50c7e46cea1b1f24079651ebf68521f0e1815995.tar.gz
dico-50c7e46cea1b1f24079651ebf68521f0e1815995.tar.bz2
Use Imprimatur to check the docs.
* .gitmodules: Add imprimatur. * Makefile.am (ACLOCAL_AMFLAGS,SUBDIRS): Add imprimatur. * configure.ac: Call IMPRIMATUR_INIT. * doc/Makefile.am: Use imprimatur. Drop files that are no longer necessary. * doc/check-docs.sh: Delete. * doc/mastermenu.el: Delete. * doc/untabify.el: Delete * doc/dico.texi: Fix sentence spacing, use @: where appropriate. * doc/strftime.texi: Likewise.
-rw-r--r--.gitmodules3
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac17
-rw-r--r--doc/Makefile.am82
-rwxr-xr-xdoc/check-docs.sh74
-rw-r--r--doc/dico.texi44
-rw-r--r--doc/mastermenu.el90
-rw-r--r--doc/strftime.texi8
-rw-r--r--doc/untabify.el13
m---------imprimatur0
10 files changed, 48 insertions, 287 deletions
diff --git a/.gitmodules b/.gitmodules
index 98e7c8e..e01b649 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,6 @@
[submodule "gint"]
path = gint
url = git://git.gnu.org.ua/gint.git
+[submodule "imprimatur"]
+ path = imprimatur
+ url = git://git.gnu.org.ua/imprimatur.git
diff --git a/Makefile.am b/Makefile.am
index fd48c0b..254632e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,9 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>.
-ACLOCAL_AMFLAGS = -I m4 -I am -I gint
+ACLOCAL_AMFLAGS = -I m4 -I am -I gint -I imprimatur
-SUBDIRS=include utils gint gnu lib libltdl dicod modules dico tests doc po
+SUBDIRS=include utils gint gnu lib libltdl dicod modules dico tests imprimatur doc po
#FIXME: add these when ready: makedict client fonts
EXTRA_DIST = ChangeLog.2008
diff --git a/configure.ac b/configure.ac
index addae63..2d23f1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -428,22 +428,7 @@ if test $status_ldap != no; then
fi
AM_CONDITIONAL([LDAP_COND], [test $status_ldap = yes])
-# Doc hints.
-# Select a rendition level:
-# DISTRIB for stable releases (at most one dot in the version number)
-# and maintenance releases (two dots, patchlevel < 50)
-# PROOF for alpha releases.
-# PUBLISH can only be required manually when running make in doc/
-AC_SUBST(RENDITION)
-case `echo $VERSION|sed 's/[[^.]]//g'` in
-""|".") RENDITION=DISTRIB;;
-"..") if test `echo $VERSION | sed 's/.*\.//'` -lt 50; then
- RENDITION=DISTRIB
- else
- RENDITION=PROOF
- fi;;
-*) RENDITION=PROOF;;
-esac
+IMPRIMATUR_INIT
AC_CONFIG_COMMANDS([status],[
cat <<EOT
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 972ee27..dbe2a4f 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -24,88 +24,35 @@ dico_TEXINFOS=\
strftime.texi
EXTRA_DIST = \
- check-docs.sh\
- gendocs_template\
- mastermenu.el\
- untabify.el
+ gendocs_template
clean-local:
rm -rf manual
-# Checking
-check-format:
- @if test -n "`cat $(info_TEXINFOS) $(dico_TEXINFOS) | tr -d -c '\t'`"; then \
- echo "Sources contain tabs; run make untabify"; \
- false; \
- fi
+AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@
+imprimatur_INPUT=$(info_TEXINFOS) $(dico_TEXINFOS)
+include ../imprimatur/imprimatur.mk
+CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh
+# Checking
check-options:
- @check-docs.sh options \
+ @$(CHECK_DOCS) options \
'/OPTIONS_BEGIN/,/OPTIONS_END/s/OPTION( *\([^,][^,]*\),.*/\1/pg' \
'/@c option --/{s///;s/^\(help\|version\|usage\)//;p}' \
$(top_srcdir)/dicod/cmdline.opt -- \
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
$(info_TEXINFOS)
-check-refs:
- @for file in $(info_TEXINFOS) $(dico_TEXINFOS); \
- do \
- sed -e = $$file | \
- sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/'$$file':\1: \2/gp}'; \
- done > $@-t; \
- if [ -s $@-t ]; then \
- echo "Unresolved cross-references:"; \
- cat $@-t;\
- rm $@-t; \
- else \
- rm -f $@-t; \
- fi
-
-check-fixmes:
- @for file in $(info_TEXINFOS); \
- do \
- sed -e = $$file | \
- sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \
- done > $@-t; \
- if [ -s $@-t ]; then \
- echo "Unresolved FIXMEs:"; \
- cat $@-t; \
- rm $@-t; \
- false; \
- else \
- rm -f $@-t; \
- fi
-
-check-unrevised:
- @grep -Hn @UNREVISED $(info_TEXINFOS) $(dico_TEXINFOS) > $@-t; \
- if [ -s $@-t ]; then \
- echo "Unrevised nodes:"; \
- cat $@-t; \
- rm $@-t; \
- false;\
- else \
- rm $@-t; \
- fi
-
-all-check-docs: check-format check-options check-refs check-fixmes check-unrevised
+all-check-docs: imprimatur-basic-checks check-options
check-docs:
$(MAKE) -k all-check-docs
#
-master-menu:
- emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
-
-untabify:
- emacs -batch -l untabify.el $(info_TEXINFOS) $(dico_TEXINFOS)
-
-final: untabify master-menu
-
-# The rendering level is one of PUBLISH, DISTRIB or PROOF.
-# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
-
-MAKEINFOFLAGS=-D$(RENDITION)
+master-menu: imprimatur-master-menu
+untabify: imprimatur-untabify
+final: imprimatur-final
GENDOCS=gendocs.sh
@@ -116,9 +63,10 @@ TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
# TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions
manual:
TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
- MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
- TEXI2DVI="$(TEXI2DVI) -t @finalout" \
- $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual'
+ MAKEINFO="$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \
+ TEXI2DVI="$(TEXI2DVI)" \
+ TEXI2HTML="texi2html $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \
+ $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual'
manual.tar.bz2: manual
tar cfj manual.tar.bz2 manual
diff --git a/doc/check-docs.sh b/doc/check-docs.sh
deleted file mode 100755
index 46a2dcc..0000000
--- a/doc/check-docs.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-# This file is part of GNU Dico.
-# Copyright (C) 2006, 2007, 2008, 2010 Sergey Poznyakoff
-#
-# This program 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.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-
-usage() {
- cat <<EOT
-usage: $0 item code-sed doc-sed sources -- args...
-EOT
-}
-
-if [ $# -le 4 ]; then
- usage
- exit 2
-fi
-
-item=$1
-shift
-codesexp="$1"
-shift
-docsexp=$1
-shift
-
-source=
-while [ $# -ne 0 ]
-do
- if [ "$1" = "--" ]; then
- shift
- break;
- fi
- source="$source $1"
- shift
-done
-
-TEMPDIR=/tmp/mfck.$$
-mkdir $TEMPDIR || exit 1
-trap 'rm -rf $TEMPDIR' 1 2 13 15
-
-sed -n "$codesexp" $source | tr -s '\n' | sort | uniq > $TEMPDIR/src
-$* | \
- sed -n '/^@macro/,/^@end macro/d;'"$docsexp" | tr -s '\n' |
- sort | uniq > $TEMPDIR/doc
-
-join -v1 $TEMPDIR/src $TEMPDIR/doc > $TEMPDIR/src-doc
-join -v2 $TEMPDIR/src $TEMPDIR/doc > $TEMPDIR/doc-src
-(if [ -s $TEMPDIR/src-doc ]; then
- echo "Not documented $item:"
- cat $TEMPDIR/src-doc
- fi
- if [ -s $TEMPDIR/doc-src ]; then
- echo "Non-existing $item:"
- cat $TEMPDIR/doc-src
- fi) > $TEMPDIR/report
-
-if [ -s $TEMPDIR/report ]; then
- cat $TEMPDIR/report
- rm -rf $TEMPDIR
- exit 1
-else
- rm -rf $TEMPDIR
- exit 0
-fi
diff --git a/doc/dico.texi b/doc/dico.texi
index a845ef6..407c896 100644
--- a/doc/dico.texi
+++ b/doc/dico.texi
@@ -158,6 +158,7 @@ Configuration File Syntax
Authentication
* text:: Flat Text Databases.
+* ldap:: LDAP Databases.
Databases
@@ -171,6 +172,7 @@ Modules
* Python::
* Stratall::
* Substr::
+* Ldap::
The @command{guile} module.
@@ -436,7 +438,7 @@ to identify this particular database in a set of available databases.
Two more pieces of textual data are associated with a database. A
@dfn{database information} string (or @dfn{info}, for short), supplies
a short description of the database. It is a sentence, tersely
-describing the database, e.g. @samp{English-German Dictionary}. A
+describing the database, e.g.@: @samp{English-German Dictionary}. A
@dfn{database description} provides full description of the
dictionary, with author credits and copyright information. The length
of this description is not limited.
@@ -631,7 +633,7 @@ directives any time by running @command{dicod --config-help}.
A @command{dicod} configuration consists of statements and comments.
There are three classes of lexical tokens: keywords, values, and
-separators. Blanks, tabs, newlines and comments, collectively called
+separators. Blanks, tabs, newlines and comments, collectively called
@dfn{white space} are ignored except as they serve to separate
tokens. Some white space is required to separate otherwise adjacent
keywords and values.
@@ -832,7 +834,7 @@ EOT
Body of a here-document is interpreted the same way as
double-quoted string, unless @var{word} is preceded by a backslash
-(e.g. @samp{<<\EOT}) or enclosed in double-quotes, in which case
+(e.g.@: @samp{<<\EOT}) or enclosed in double-quotes, in which case
the text is read as is, without interpretation of escape sequences.
If @var{word} is prefixed with @code{-} (a dash), then all leading
@@ -874,7 +876,7 @@ capability (mime,auth);
In any case where a list is appropriate, a single value is allowed
without being a member of a list: it is equivalent to a list with a
-single member. This means that, e.g. @samp{capability mime;} is
+single member. This means that, e.g.@: @samp{capability mime;} is
equivalent to @samp{capability (mime);}.
@end table
@@ -935,7 +937,7 @@ if @command{dicod} is running in inetd mode. @xref{Inetd Mode}.
@anchor{mode statement}
@deffn {Configuration} mode @var{enum}
-Sets server operation mode. The argument is one of:
+Sets server operation mode. The argument is one of:
@table @asis
@item daemon
@@ -946,7 +948,7 @@ Run in inetd mode. @xref{Inetd Mode}, for a detailed description.
@end table
This statement is overridden by the @option{--inetd} command line
-option. @xref{--inetd}.
+option. @xref{--inetd}.
@end deffn
@deffn {Configuration} listen @var{list};
@@ -1111,12 +1113,12 @@ User password necessary to access the database.
Domain name or @acronym{IP} address of a machine running the database.
@item path
-A @dfn{path} to the database. The exact meaning of this element
-depends on the database protocol. It is described in detail when
+A @dfn{path} to the database. The exact meaning of this element
+depends on the database protocol. It is described in detail when
discussing particular database protocols.
@item params
-A list of protocol-dependent parameters. Each parameter is of the
+A list of protocol-dependent parameters. Each parameter is of the
form @code{@var{keyword}=@var{name}}, multiple parameters are separated
with semicolons.
@end table
@@ -1238,7 +1240,7 @@ the @samp{ldap} module (@pxref{Ldap, LDAP module}):
@smallexample
load-module ldap @{
- command "ldap";
+ command "ldap";
@}
@end smallexample
@@ -1328,7 +1330,7 @@ user-db "ldap://localhost" @{
A note on password usage is in order here. Most authentication methods
require the passwords to be stored in the database in @emph{plain
-text} form. The use of encrypted passwords (e.g. MD5 or SHA1) is
+text} form. The use of encrypted passwords (e.g.@: MD5 or SHA1) is
possible only with @samp{LOGIN} and @samp{PLAIN} GSASL authentication
methods.
@@ -1420,7 +1422,7 @@ must be an integer number in the range from 0 to 32. The address part,
The specifier matches if the result of logical @acronym{AND} between
the client @acronym{IP} address and @var{netmask} equals to
@var{addr}. The network mask must be specified in ``dotted quad''
-form, e.g. @samp{255.255.255.224}.
+form, e.g.@: @samp{255.255.255.224}.
@item @var{filename}
Matches if connection was received from a @acronym{UNIX} socket
@@ -1616,7 +1618,7 @@ The time taken to serve the request, in microseconds.
@item %d
Request command verb in abbreviated form, suitable for use in
-@acronym{URL}s, i.e. @samp{d} for @code{DEFINE}, and @samp{m} for
+@acronym{URL}s, i.e.@: @samp{d} for @code{DEFINE}, and @samp{m} for
@code{MATCH}. @xref{urls}.
@item %h
@@ -1839,7 +1841,7 @@ following table:
@table @asis
@item auth
-The @code{AUTH} command is supported. @xref{Authentication}.
+The @code{AUTH} command is supported. @xref{Authentication}.
@item mime
The @code{OPTION MIME} command is supported. Notice that
@@ -1885,7 +1887,7 @@ sub-statement allowed within it is @code{command} statement:
@deffn {load-module config} command @var{string}
Set the command line for this handler. It is similar to shell's
command line: it consists of a name of database module, optionally
-followed by a whitespace-separated list of its arguments. Just as in
+followed by a whitespace-separated list of its arguments. Just as in
shell, the name of the module specifies the disk file which should be
loaded. Arguments are passed to the module @dfn{initialization function}
(@pxref{dico_init}).
@@ -2753,7 +2755,7 @@ initializing the module instance.
@cindex Guile
@cindex Scheme
@dfn{Guile} is an acronym for @dfn{GNU's Ubiquitous Intelligent
-Language for Extensions}. It provides a Scheme interpreter conforming
+Language for Extensions}. It provides a Scheme interpreter conforming
to the R5RS language specification and a number of convenience
functions. For information about the language, refer to
@ref{Top,,,r5rs,Revised(5) Report on the Algorithmic Language Scheme}.
@@ -2806,7 +2808,7 @@ must be a list of directory names, separated by colons.
This option modifies the value of Guile's @code{%load-path}
variable.
-@c FIXME: Texi2html is unable to handle \, in the section title. This
+@c FIXME: Texi2html is unable to handle \, in the section title. This
@c conditional overrides this bug.
@ifnothtml
@xref{Build Config, %load-path,
@@ -3161,7 +3163,7 @@ Create new key object from strategy @var{strat} and word @var{word}.
@defun dico-strat-selector? @var{strat}
-Return true if @var{strat} has a selector. @FIXME-pxref{selector}.
+Return true if @var{strat} has a selector. @FIXME-pxref{selector}.
@end defun
@defun dico-strat-select? @var{strat} @var{word} @var{key}
@@ -3522,7 +3524,7 @@ The module needs no additional configuration parameters:
@smallexample
load-module ldap @{
- command "ldap";
+ command "ldap";
@}
@end smallexample
@@ -4462,7 +4464,7 @@ Set or display session transcript mode.
@xref{Session Transcript}.
@item verbose [@var{number}]
-Set or display debugging verbosity level. @FIXME-xref{}.
+Set or display debugging verbosity level. @FIXME{cross-reference, maybe?}.
@item prompt @var{string}
Change command line prompt.
@@ -4919,7 +4921,7 @@ shows the basic set of information that is needed in order to find the bug:
@item A detailed description of the bug.
@item Conditions under which the bug appears.
@item It is often helpful to send the contents of @file{config.log}
-file along with your bug report. This file is created after running
+file along with your bug report. This file is created after running
@command{./configure} in the source root directory of GNU Dico.
@end itemize
diff --git a/doc/mastermenu.el b/doc/mastermenu.el
deleted file mode 100644
index 3ab3341..0000000
--- a/doc/mastermenu.el
+++ /dev/null
@@ -1,90 +0,0 @@
-;;; mastermenu.el --- Redefinition of texinfo-master-menu-list
-
-;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
-
-;; Author: Sergey Poznyakoff
-;; Maintainer: bug-tar@gnu.org
-;; Keywords: maint, tex, docs
-
-;; This file is part of GNU tar documentation suite
-
-;; This program 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.
-
-;; This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; This file redefines texinfo-master-menu-list so that it takes into
-;; account included files.
-
-;; Known bugs: @menu without previous sectioning command will inherit
-;; documentation string from the previous menu. However, since such a
-;; menu is illegal in a texinfo file, we can live with it.
-
-(require 'texinfo)
-(require 'texnfo-upd)
-
-(defun texinfo-master-menu-list-recursive (title)
- "Auxiliary function used by `texinfo-master-menu-list'."
- (save-excursion
- (let (master-menu-list)
- (while (re-search-forward "\\(^@menu\\|^@include\\)" nil t)
- (cond
- ((string= (match-string 0) "@include")
- (skip-chars-forward " \t")
- (let ((included-name (let ((start (point)))
- (end-of-line)
- (skip-chars-backward " \t")
- (buffer-substring start (point)))))
- (end-of-line)
- (let ((prev-title (texinfo-copy-menu-title)))
- (save-excursion
- (set-buffer (find-file-noselect included-name))
- (setq master-menu-list
- (append (texinfo-master-menu-list-recursive prev-title)
- master-menu-list))))))
- (t
- (setq master-menu-list
- (cons (list
- (texinfo-copy-menu)
- (let ((menu-title (texinfo-copy-menu-title)))
- (if (string= menu-title "")
- title
- menu-title)))
- master-menu-list)))))
- master-menu-list)))
-
-(defun texinfo-master-menu-list ()
- "Return a list of menu entries and header lines for the master menu,
-recursing into included files.
-
-Start with the menu for chapters and indices and then find each
-following menu and the title of the node preceding that menu.
-
-The master menu list has this form:
-
- \(\(\(... \"entry-1-2\" \"entry-1\"\) \"title-1\"\)
- \(\(... \"entry-2-2\" \"entry-2-1\"\) \"title-2\"\)
- ...\)
-
-However, there does not need to be a title field."
-
- (reverse (texinfo-master-menu-list-recursive "")))
-
-(defun make-master-menu ()
- "Create master menu in the first Emacs argument."
- (find-file (car command-line-args-left))
- (texinfo-master-menu nil)
- (save-buffer))
-
-
-;;; mastermenu.el ends here
diff --git a/doc/strftime.texi b/doc/strftime.texi
index 980229a..301a042 100644
--- a/doc/strftime.texi
+++ b/doc/strftime.texi
@@ -12,7 +12,7 @@ Essentially, it is a reproduction of the man page for GNU
@code{strftime} function.
Ordinary characters placed in the format string are reproduced without
-conversion. Conversion specifiers are introduced by a @samp{%}
+conversion. Conversion specifiers are introduced by a @samp{%}
character, and are replaced as follows:
@multitable @columnfractions 0.2 0.7
@@ -78,13 +78,13 @@ to 366).
(@pxref{conversion specs}).
@item %p @tab Either @samp{AM} or @samp{PM} according to the given time
-value, or the corresponding strings for the current locale. Noon is
+value, or the corresponding strings for the current locale. Noon is
treated as @samp{pm} and midnight as @samp{am}.
@item %P @tab Like @samp{%p} but in lowercase: @samp{am} or @samp{pm}
or a corresponding string for the current locale.
-@item %r @tab The time in @samp{a.m.} or @samp{p.m.} notation. In the POSIX
+@item %r @tab The time in @samp{a.m.} or @samp{p.m.} notation. In the POSIX
locale this is equivalent to @samp{%I:%M:%S %p}.
@item %R @tab The time in 24-hour notation (@samp{%H:%M}). For a
@@ -127,7 +127,7 @@ without the date.
@item %Y @tab The year as a decimal number including the century.
-@item %z @tab The time-zone as hour offset from @acronym{GMT}. Required to
+@item %z @tab The time-zone as hour offset from @acronym{GMT}. Required to
emit RFC822-conformant dates (using @samp{%a, %d %b %Y %H:%M:%S %z})
@item %Z @tab The time zone or name or abbreviation.
diff --git a/doc/untabify.el b/doc/untabify.el
deleted file mode 100644
index 77dd5c0..0000000
--- a/doc/untabify.el
+++ /dev/null
@@ -1,13 +0,0 @@
-;;;; Untabify the sources.
-;;;; Usage: emacs -batch -l untabify.el [file ...]
-
-(defun global-untabify (buflist)
- (mapcar
- (lambda (bufname)
- (set-buffer (find-file bufname))
- (untabify (point-min) (point-max))
- (save-buffer)
- (kill-buffer (current-buffer)))
- buflist))
-
-(global-untabify command-line-args-left)
diff --git a/imprimatur b/imprimatur
new file mode 160000
+Subproject f32ef1983968e755cd580b06e369476d7e7f88b

Return to:

Send suggestions and report system problems to the System administrator.