aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-10-08 01:21:59 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-10-08 01:21:59 +0300
commiteb8797c9a28f3f4e238bad89b56d331492df7828 (patch)
tree91d59a8d31d88c3c51899ed7f0a816da5263e581
parenta31c3374d2c32de00feb7b9d029e6846abd0a76d (diff)
downloadpies-eb8797c9a28f3f4e238bad89b56d331492df7828.tar.gz
pies-eb8797c9a28f3f4e238bad89b56d331492df7828.tar.bz2
Use Imprimatur for docs processing.
* .gitmodules: Add imprimatur. * Makefile.am (ACLOCAL_AMFLAGS,SUBDIRS): Add imprimatur. * configure.ac: Require gettext 0.18. Call IMPRIMATUR_INIT. Define ATTRIBUTE_NORETURN, if not defined already. * doc/Makefile.am: Use imprimatur. Drop files that are no longer necessary. * doc/check-docs.sh: Delete. * doc/fix-sentence-spacing.sed: Delete. * doc/mastermenu.el: Delete. * doc/rendition.texi: Delete. * doc/untabify.el: Delete. * doc/pies.texi: Use @: where appropriate. * src/pies.c (main): Use _() instead of N_().
-rw-r--r--.gitmodules3
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac25
-rw-r--r--doc/Makefile.am113
-rwxr-xr-xdoc/check-docs.sh74
-rw-r--r--doc/fix-sentence-spacing.sed4
-rw-r--r--doc/mastermenu.el90
-rw-r--r--doc/pies.texi16
-rw-r--r--doc/rendition.texi94
-rw-r--r--doc/untabify.el13
m---------imprimatur0
-rw-r--r--src/pies.c4
12 files changed, 39 insertions, 401 deletions
diff --git a/.gitmodules b/.gitmodules
index fea8f96..c20307a 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
1[submodule "grecs"] 1[submodule "grecs"]
2 path = grecs 2 path = grecs
3 url = git://git.gnu.org.ua/grecs.git 3 url = git://git.gnu.org.ua/grecs.git
4[submodule "imprimatur"]
5 path = imprimatur
6 url = git://git.gnu.org.ua/imprimatur.git
diff --git a/Makefile.am b/Makefile.am
index c4893c2..b3c49a2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,9 +14,9 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with GNU Pies. If not, see <http://www.gnu.org/licenses/>. 15# along with GNU Pies. If not, see <http://www.gnu.org/licenses/>.
16 16
17ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am 17ACLOCAL_AMFLAGS = -I m4 -I am -I grecs/am -I imprimatur
18 18
19SUBDIRS=gnu grecs lib src doc po 19SUBDIRS=gnu grecs lib src imprimatur doc po
20 20
21dist-hook: 21dist-hook:
22 @PATCHLEV=`echo "$(PACKAGE_VERSION)" | \ 22 @PATCHLEV=`echo "$(PACKAGE_VERSION)" | \
diff --git a/configure.ac b/configure.ac
index 0d2881c..a8848dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,7 +65,7 @@ MF_PROCTITLE
65# Gettext. 65# Gettext.
66AM_ICONV 66AM_ICONV
67AM_GNU_GETTEXT([external], [need-formatstring-macros]) 67AM_GNU_GETTEXT([external], [need-formatstring-macros])
68AM_GNU_GETTEXT_VERSION([0.17]) 68AM_GNU_GETTEXT_VERSION([0.18])
69 69
70AC_ARG_ENABLE([inetd], 70AC_ARG_ENABLE([inetd],
71 AC_HELP_STRING([--enable-inetd], 71 AC_HELP_STRING([--enable-inetd],
@@ -75,22 +75,13 @@ AC_ARG_ENABLE([inetd],
75 no) ;; 75 no) ;;
76 esac]) 76 esac])
77 77
78# Doc hints. 78AH_BOTTOM([
79# Select a rendition level: 79# ifndef ATTRIBUTE_NORETURN
80# DISTRIB for stable releases (at most one dot in the version number) 80# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
81# and maintenance releases (two dots, patchlevel < 50) 81# endif
82# PROOF for alpha releases. 82])
83# PUBLISH can only be required manually when running make in doc/ 83
84AC_SUBST(RENDITION) 84IMPRIMATUR_INIT
85case `echo $VERSION|sed 's/[[^.]]//g'` in
86""|".") RENDITION=DISTRIB;;
87"..") if test `echo $VERSION | sed 's/.*\.//'` -lt 50; then
88 RENDITION=DISTRIB
89 else
90 RENDITION=PROOF
91 fi;;
92*) RENDITION=PROOF;;
93esac
94 85
95AC_CONFIG_FILES([Makefile 86AC_CONFIG_FILES([Makefile
96 gnu/Makefile 87 gnu/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
index da7d47c..492a6ae 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,36 +19,25 @@ pies_TEXINFOS=\
19 fdl.texi\ 19 fdl.texi\
20 inetd.texi\ 20 inetd.texi\
21 macros.texi\ 21 macros.texi\
22 rendition.texi\
23 usr-acl.texi 22 usr-acl.texi
24 23
25EXTRA_DIST = \ 24EXTRA_DIST = \
26 check-docs.sh\ 25 gendocs_template
27 fix-sentence-spacing.sed\
28 gendocs_template\
29 mastermenu.el\
30 untabify.el
31 26
32clean-local: 27clean-local:
33 @rm -rf manual 28 @rm -rf manual
34 29
35# Checking 30# Checking
36check-tabs:
37 @if test -n "`cat $(info_TEXINFOS) $(pies_TEXINFOS) | tr -d -c '\t'`"; then \
38 echo "Sources contain tabs; run make untabify"; \
39 false; \
40 fi
41 31
42check-sentence-spacing: 32AM_MAKEINFOFLAGS = @IMPRIMATUR_MAKEINFOFLAGS@
43 @if cat $(info_TEXINFOS) $(pies_TEXINFOS) | sed 's/i\.e\. //g;s/e\.g\. //g;s/\.\.\. @//g' | grep -q '\. [@A-Z]'; then \ 33imprimatur_INPUT=$(info_TEXINFOS) $(pies_TEXINFOS)
44 echo >&2 "Sources contain single-space sentence separators"; \ 34include ../imprimatur/imprimatur.mk
45 echo >&2 "Run make fix-sentence-spacing to fix"; \ 35CHECK_DOCS=$(top_srcdir)/@IMPRIMATUR_MODULE_DIR@/check-docs.sh
46 fi
47 36
48check-format: check-tabs check-sentence-spacing 37check-format: imprimatur-format imprimatur-check-sentence-spacing
49 38
50check-options: 39check-options:
51 @check-docs.sh options \ 40 @$(CHECK_DOCS) options \
52 '/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 41 '/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
53 's/@opindex *\([^@,]*\).*/\1/p' \ 42 's/@opindex *\([^@,]*\).*/\1/p' \
54 $(top_srcdir)/src/pies.c -- \ 43 $(top_srcdir)/src/pies.c -- \
@@ -56,7 +45,7 @@ check-options:
56 $(info_TEXINFOS) 45 $(info_TEXINFOS)
57 46
58check-config: 47check-config:
59 @check-docs.sh 'configuration statements' \ 48 @$(CHECK_DOCS) 'configuration statements' \
60 '/pies_keywords\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 49 '/pies_keywords\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
61 's/@deffnx\{0,1\} {Config} *\([^@,]*\).*/\1/p' \ 50 's/@deffnx\{0,1\} {Config} *\([^@,]*\).*/\1/p' \
62 $(top_srcdir)/src/pies.c -- \ 51 $(top_srcdir)/src/pies.c -- \
@@ -66,7 +55,7 @@ check-config:
66check-sub-config: 55check-sub-config:
67 @sed -n '/pies_keywords\[\] *= *{/,/^}/{p}' ../src/pies.c|tr '\n{' ' \n'|sed -n '/grecs_type_section/s/"\([^"]*\)".*grecs_type_section,[^,]*,[^,]*,[^,]*,[^,]*, *\(.*\) *}.*/\1 \2/p' | \ 56 @sed -n '/pies_keywords\[\] *= *{/,/^}/{p}' ../src/pies.c|tr '\n{' ' \n'|sed -n '/grecs_type_section/s/"\([^"]*\)".*grecs_type_section,[^,]*,[^,]*,[^,]*,[^,]*, *\(.*\) *}.*/\1 \2/p' | \
68 while read ident kw; do \ 57 while read ident kw; do \
69 check-docs.sh "$$ident configuration statements" \ 58 $(CHECK_DOCS) "$$ident configuration statements" \
70 "/$$kw"'\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \ 59 "/$$kw"'\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
71 "s/@deffnx\{0,1\} {Config: *$${ident}}"' *\([^@,]*\).*/\1/p' \ 60 "s/@deffnx\{0,1\} {Config: *$${ident}}"' *\([^@,]*\).*/\1/p' \
72 $(top_srcdir)/src/pies.c $(top_srcdir)/src/acl.c -- \ 61 $(top_srcdir)/src/pies.c $(top_srcdir)/src/acl.c -- \
@@ -74,87 +63,16 @@ check-sub-config:
74 $(info_TEXINFOS); \ 63 $(info_TEXINFOS); \
75 done 64 done
76 65
77check-refs: 66all-check-docs: imprimatur-basic-checks \
78 @for file in $(info_TEXINFOS) $(pies_TEXINFOS); \ 67 check-options check-config check-sub-config
79 do \
80 sed -e = $$file | \
81 sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/'$$file':\1: \2/gp}'; \
82 done > $@-t; \
83 if [ -s $@-t ]; then \
84 echo "Unresolved cross-references:"; \
85 cat $@-t;\
86 rm $@-t; \
87 else \
88 rm -f $@-t; \
89 fi
90
91check-fixmes:
92 @for file in $(info_TEXINFOS) $(pies_TEXINFOS); \
93 do \
94 sed -e = $$file | \
95 sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \
96 done > $@-t; \
97 if [ -s $@-t ]; then \
98 echo "Unresolved FIXMEs:"; \
99 cat $@-t; \
100 rm $@-t; \
101 false; \
102 else \
103 rm -f $@-t; \
104 fi
105
106check-writeme:
107 @grep -Hn @WRITEME $(info_TEXINFOS) $(pies_TEXINFOS) > $@-t; \
108 if [ -s $@-t ]; then \
109 echo "Empty nodes:"; \
110 cat $@-t; \
111 rm $@-t; \
112 false;\
113 else \
114 rm $@-t; \
115 fi
116
117check-unrevised:
118 @grep -Hn @UNREVISED $(info_TEXINFOS) $(pies_TEXINFOS) > $@-t; \
119 if [ -s $@-t ]; then \
120 echo "Unrevised nodes:"; \
121 cat $@-t; \
122 rm $@-t; \
123 false;\
124 else \
125 rm $@-t; \
126 fi
127
128all-check-docs: check-format check-options \
129 check-config check-sub-config \
130 check-refs check-fixmes check-writeme check-unrevised
131 68
132check-docs: 69check-docs:
133 @$(MAKE) -k all-check-docs 70 @$(MAKE) -k all-check-docs
134 71
135# 72#
136 73master-menu: imprimatur-master-menu
137master-menu: 74untabify: imprimatur-untabify
138 $(AM_V_GEN)emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS) 75final: imprimatur-final
139
140untabify:
141 @emacs -batch -l untabify.el $(info_TEXINFOS) $(pies_TEXINFOS)
142
143fix-sentence-spacing:
144 for file in $(info_TEXINFOS) $(wydawca_TEXINFOS); \
145 do \
146 if grep -q '\. [@A-Z]' $$file; then \
147 mv $$file $${file}~; \
148