aboutsummaryrefslogtreecommitdiff
path: root/doc/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am22
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6d47f51..73bd72a 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -23,6 +23,7 @@ pies_TEXINFOS=\
EXTRA_DIST = \
check-docs.sh\
+ fix-sentence-spacing.sed\
gendocs_template\
mastermenu.el\
untabify.el
@@ -31,12 +32,20 @@ clean-local:
@rm -rf manual
# Checking
-check-format:
+check-tabs:
@if test -n "`cat $(info_TEXINFOS) $(pies_TEXINFOS) | tr -d -c '\t'`"; then \
echo "Sources contain tabs; run make untabify"; \
false; \
fi
+check-sentence-spacing:
+ @if cat $(info_TEXINFOS) $(pies_TEXINFOS) | sed 's/i\.e\. //g;s/e\.g\. //g;s/\.\.\. @//g' | grep -q '\. [@A-Z]'; 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 \
'/argp_option options\[\] = /,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
@@ -130,7 +139,16 @@ master-menu:
untabify:
@emacs -batch -l untabify.el $(info_TEXINFOS) $(pies_TEXINFOS)
-final: untabify master-menu
+fix-sentence-spacing:
+ for file in $(info_TEXINFOS) $(wydawca_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
# The rendering level is one of PUBLISH, DISTRIB or PROOF.
# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.

Return to:

Send suggestions and report system problems to the System administrator.