aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-10-02 12:24:13 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-10-02 12:24:13 +0300
commit492d1763e951c8dfd2915ca7c6d497859d4d7069 (patch)
tree55f0db1d7d12bc74d0255bf207e49ad820237df8
parent65b05f3562b1aead4296427c5f6941cb53d94adf (diff)
downloadcfpeek-492d1763e951c8dfd2915ca7c6d497859d4d7069.tar.gz
cfpeek-492d1763e951c8dfd2915ca7c6d497859d4d7069.tar.bz2
Use Imprimatur for documentation development and maintenance.
-rw-r--r--.gitmodules3
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac3
-rw-r--r--doc/GNUmakefile4
-rw-r--r--doc/Makefile.am86
-rwxr-xr-xdoc/check-docs.sh74
-rw-r--r--doc/mastermenu.el90
-rw-r--r--doc/rendition.texi94
-rw-r--r--doc/untabify.el13
m---------grecs0
m---------imprimatur0
11 files changed, 20 insertions, 351 deletions
diff --git a/.gitmodules b/.gitmodules
index 4aa4638..ed59ef1 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 dab4333..c4c9309 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 cfpeek. If not, see <http://www.gnu.org/licenses/>.
-ACLOCAL_AMFLAGS = -I grecs/am -I gint
+ACLOCAL_AMFLAGS = -I grecs/am -I gint -I imprimatur
-SUBDIRS = grecs gint src doc tests
+SUBDIRS = grecs gint src imprimatur doc tests
.PHONY: ChangeLog
ChangeLog:
diff --git a/configure.ac b/configure.ac
index fd419fe..17edec6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,9 @@ GRECS_SETUP(grecs, [tests getopt git2chg all-parsers syntax-doc])
GINT_INIT([gint], [1.8 with-guile doc-distrib], [use_guile=yes], [use_guile=no])
AM_CONDITIONAL([CFPEEK_COND_GUILE],[test $use_guile = yes])
+# Imprimatur
+IMPRIMATUR_INIT
+
# Initialize the test suite.
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
diff --git a/doc/GNUmakefile b/doc/GNUmakefile
index feca637..3ec716b 100644
--- a/doc/GNUmakefile
+++ b/doc/GNUmakefile
@@ -26,7 +26,7 @@ $(LISTINGS): cfpeek.texi
%.texi: %.scm
$(AM_V_GEN)sed '/^;;;;/d' $< > $@ && \
- emacs -batch -l untabify.el $@
+ emacs -batch -l $(top_srcdir)/$(IMPRIMATUR_MODULE_DIR)/untabify.el $@
%.lst: cfpeek.texi
$(AM_V_GEN)cmd=`sed -n 's/@runex{$* *, *\(.*\)}/\1/p' cfpeek.texi`; \
@@ -47,7 +47,7 @@ $(LISTINGS): cfpeek.texi
exit 1; \
fi; \
if test -s $@-t; then \
- emacs -batch -l untabify.el $@-t; \
+ emacs -batch -l $(top_srcdir)/$(IMPRIMATUR_MODULE_DIR)/untabify.el $@-t; \
mv $@-t $@; \
else \
echo >&2 "$@: command produced empty result"; \
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8058c32..6973359 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -32,7 +32,6 @@ LISTINGS = \
cfpeek_TEXINFOS=\
macros.texi\
- rendition.texi\
scripting.texi\
sample.texi\
fdl.texi\
@@ -46,11 +45,10 @@ EXTRA_DIST = sample.conf GNUmakefile togit.scm
.conf.texi:
sed '/^#/d;s/\([{}@]\)/@\1/g' $< > $@
-# The rendering level is one of PUBLISH, DISTRIB or PROOF.
-# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
-RENDITION = DISTRIB
-
-MAKEINFOFLAGS=-D$(RENDITION) -I$(top_srcdir)/@GRECS_SUBDIR@/doc
+AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@ -I$(top_srcdir)/@GRECS_SUBDIR@/doc
+imprimatur_INPUT=$(info_TEXINFOS) $(cfpeek_TEXINFOS)
+include ../imprimatur/imprimatur.mk
+CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh
GENDOCS=gendocs.sh
@@ -61,88 +59,24 @@ TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
.PHONY: manual
manual:
TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
- MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ MAKEINFO="$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)" \
TEXI2DVI="$(TEXI2DVI) -t @finalout" \
$(GENDOCS) --texi2html --html "--I=$(top_srcdir)/@GRECS_SUBDIR@/doc" $(PACKAGE) '$(PACKAGE_NAME) manual'
# Checking
-check-tabs:
- @if test -n "`cat $(info_TEXINFOS) $(cfpeek_TEXINFOS) | tr -d -c '\t'`"; then \
- echo "Sources contain tabs; run make untabify"; \
- false; \
- fi
-
-check-sentence-spacing:
- @if grep -q '\. [@A-Z]' $(info_TEXINFOS) $(cfpeek_TEXINFOS); then \
- echo >&2 "Sources contain single-space sentence separators"; \
- echo >&2 "Run make fix-sentence-spacing to fix"; \
- fi
-
-check-format: check-tabs check-sentence-spacing
-
check-options:
- @check-docs.sh options \
+ @$(CHECK_DOCS) options \
'/OPTIONS_BEGIN/,/OPTIONS_END/s/OPTION( *\([^,][^,]*\),.*/\1/pg' \
'/@opindex *\(help\|version\|usage\),/d;s/@opindex *\([^ @,]\{2,\}\).*/\1/p' \
$(top_srcdir)/src/cmdline.opt -- \
$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
$(info_TEXINFOS)
-check-refs:
- @sed -e = $(info_TEXINFOS) $(cfpeek_TEXINFOS) | \
- sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/$(info_TEXINFOS):\1: \2/gp}' > $@-t; \
- if [ -s $@-t ]; then echo "Unresolved cross-references:"; cat $@-t;\
- fi; \
- rm -f $@-t
-
-check-fixmes:
- @sed -e = $(info_TEXINFOS) | \
- sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/$(info_TEXINFOS):\1: \2/gp}' > $@-t; \
- if [ -s $@-t ]; then echo "Unresolved FIXMEs:"; cat $@-t;\
- fi; \
- rm -f $@-t
-
-check-writeme:
- @grep -Hn @WRITEME $(info_TEXINFOS) $(cfpeek_TEXINFOS) > $@-t; \
- if [ -s $@-t ]; then \
- echo "Empty nodes:"; \
- cat $@-t; \
- rm $@-t; \
- false;\
- else \
- rm $@-t; \
- fi
-
-check-unrevised:
- @grep -Hn @UNREVISED $(info_TEXINFOS) $(cfpeek_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-writeme 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) $(cfpeek_TEXINFOS)
-
-fix-sentence-spacing:
- for file in $(info_TEXINFOS) $(cfpeek_TEXINFOS); \
- do \
- if grep -q '\. [@A-Z]' $$file; then \
- mv $$file $${file}~; \
- sed -r 's/\. ([@A-Z])/. \1/g' $${file}~ > $$file; \
- fi; \
- done
-
-final: untabify fix-sentence-spacing master-menu
+master-menu: imprimatur-master-menu
+untabify: imprimatur-untabify
+final: imprimatur-final
diff --git a/doc/check-docs.sh b/doc/check-docs.sh
deleted file mode 100755
index 47ac1e3..0000000
--- a/doc/check-docs.sh
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /bin/sh
-# This file is part of mailfrom filter.
-# Copyright (C) 2006, 2007, 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 | sort | uniq > $TEMPDIR/src
-$* | \
- sed -n '/^@macro/,/^@end macro/d;'"$docsexp" \
- | 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/mastermenu.el b/doc/mastermenu.el
deleted file mode 100644
index a38e824..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/rendition.texi b/doc/rendition.texi
deleted file mode 100644
index 45ac068..0000000
--- a/doc/rendition.texi
+++ /dev/null
@@ -1,94 +0,0 @@
-@c Let's use the concept of 'renditions' by Fra@,{c}ois Pinard
-@c I extended it by adding a FIXME_FOOTNOTE variable, which controls
-@c whether FIXME information should be placed in footnotes or
-@c inlined.
-
-@c ======================================================================
-@c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF,
-@c as decided by @set symbols. The PUBLISH rendition does not show
-@c notes or marks asking for revision. Most users will prefer having more
-@c information, even if this information is not fully revised for adequacy,
-@c so DISTRIB is the default for distributions. The PROOF rendition
-@c show all marks to the point of ugliness, but is nevertheless useful to
-@c those working on the manual itself.
-@c ======================================================================
-
-@c Set this symbol if you wish FIXMEs to appear in footnotes, instead
-@c of being inserted into the text.
-@c @set PROOF_FOOTNOTED
-
-@ifclear PUBLISH
-@ifclear DISTRIB
-@ifclear PROOF
-@set DISTRIB
-@end ifclear
-@end ifclear
-@end ifclear
-
-@ifset PUBLISH
-@set RENDITION The book, version
-@end ifset
-
-@ifset DISTRIB
-@set RENDITION FTP release, version
-@end ifset
-
-@ifset PROOF
-@set RENDITION Proof reading version
-@end ifset
-
-@c Output marks for nodes needing revision, but not in PUBLISH rendition.
-
-@macro WRITEME
-@ifclear PUBLISH
-@quotation
-@emph{This node is to be written.}
-@end quotation
-@end ifclear
-@end macro
-
-@macro UNREVISED
-@ifclear PUBLISH
-@quotation
-(@emph{The information in this node may be obsolete or otherwise inaccurate.}
-This message will disappear, once this node revised.)
-@end quotation
-@end ifclear
-@end macro
-
-@c Output various FIXME information only in PROOF rendition.
-
-@macro FIXME{string}
-@ifset PROOF
-@ifset PROOF_FOOTNOTED
-@footnote{@strong{FIXME:} \string\}
-@end ifset
-@ifclear PROOF_FOOTNOTED
-@cartouche
-@strong{<FIXME>} \string\ @strong{</>}
-@end cartouche
-@end ifclear
-@end ifset
-
-@end macro
-
-@macro FIXME-ref{string}
-@ifset PROOF
-@strong{<REF>} \string\ @strong{</>}
-@end ifset
-
-@end macro
-
-@macro FIXME-pxref{string}
-@ifset PROOF
-@strong{<PXREF>} \string\ @strong{</>}
-@end ifset
-
-@end macro
-
-@macro FIXME-xref{string}
-@ifset PROOF
-@strong{<XREF>} \string\ @strong{</>}
-@end ifset
-
-@end macro
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/grecs b/grecs
-Subproject 5a37057b0ca1b7314f7f338134efc5100dc9223
+Subproject a01d5e230db6f61a6efd3384f1eafe184944c45
diff --git a/imprimatur b/imprimatur
new file mode 160000
+Subproject f32ef1983968e755cd580b06e369476d7e7f88b

Return to:

Send suggestions and report system problems to the System administrator.