aboutsummaryrefslogtreecommitdiff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-03 10:35:55 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-03 10:35:55 +0000
commit9a44143296d2be36320736a5c9ddc886baac0d56 (patch)
tree694a2b1b7fd2f7aca2e7036b1030827377033f3c /doc/Makefile.am
parentf13620502d9c7f4d2b5ad72ff80833721c7df5e8 (diff)
downloadgdbm-9a44143296d2be36320736a5c9ddc886baac0d56.tar.gz
gdbm-9a44143296d2be36320736a5c9ddc886baac0d56.tar.bz2
Rewrite.
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am51
1 files changed, 49 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 81286a8..652356b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of GDBM. -*- Makefile -*-
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
#
# GDBM is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,5 +17,52 @@
# Documentation
info_TEXINFOS = gdbm.texinfo
+gdbm_TEXINFOS=\
+ fdl.texi
+
man_MANS = gdbm.3
-EXTRA_DIST = $(man_MANS) fdl.texi
+EXTRA_DIST = $(man_MANS)
+
+GENDOCS=gendocs.sh
+
+TEXI2DVI=texi2dvi -E
+
+# Make sure you set TEXINPUTS.
+# TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions
+.PHONY: manual
+manual:
+ TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
+ MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ TEXI2DVI="$(TEXI2DVI) -t @finalout" \
+ $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual'
+
+# Checking
+check-tabs:
+ @if test -n "`cat $(info_TEXINFOS) $(gdbm_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) $(gdbm_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-docs: check-format
+
+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 \ No newline at end of file

Return to:

Send suggestions and report system problems to the System administrator.