[master] 1346cd8 Build varnishhist documentation
Martin Blix Grydeland
martin at varnish-software.com
Tue Feb 25 15:58:39 CET 2014
commit 1346cd8b6f5aaf9bb5b47c16b301267c53e261bf
Author: Guillaume Quintard <guillaume.quintard at gmail.com>
Date: Tue Feb 4 15:02:32 2014 +0100
Build varnishhist documentation
diff --git a/bin/varnishhist/Makefile.am b/bin/varnishhist/Makefile.am
index a24f29a..986966f 100644
--- a/bin/varnishhist/Makefile.am
+++ b/bin/varnishhist/Makefile.am
@@ -19,3 +19,35 @@ varnishhist_LDADD = \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
-lm \
@CURSES_LIB@ ${RT_LIBS} ${PTHREAD_LIBS}
+
+noinst_PROGRAMS = varnishhist_opt2rst
+varnishhist_opt2rst_SOURCES = \
+ varnishhist_options.h \
+ varnishhist_options.c \
+ $(top_srcdir)/lib/libvarnishtools/opt2rst.c
+
+BUILT_SOURCES = varnishhist_options.rst varnishhist_synopsis.rst
+EXTRA_DIST = $(BUILT_SOURCES)
+MAINTAINERCLEANFILES = $(EXTRA_DIST)
+
+varnishhist_options.rst:
+ ./varnishhist_opt2rst options > $@
+varnishhist_synopsis.rst:
+ ./varnishhist_opt2rst synopsis > $@
+
+if HAVE_RST2MAN
+varnishhist_options.rst varnishhist_synopsis.rst: varnishhist_opt2rst
+endif
+
+varnishhist.1: \
+ $(top_srcdir)/doc/sphinx/reference/varnishhist.rst \
+ varnishhist_options.rst \
+ varnishhist_synopsis.rst
+if HAVE_RST2MAN
+ ${RST2MAN} $(top_srcdir)/doc/sphinx/reference/varnishhist.rst $@
+else
+ @echo "========================================"
+ @echo "You need rst2man installed to make dist"
+ @echo "========================================"
+ @false
+endif
diff --git a/bin/varnishhist/varnishhist_options.h b/bin/varnishhist/varnishhist_options.h
index e362d32..2b71835 100644
--- a/bin/varnishhist/varnishhist_options.h
+++ b/bin/varnishhist/varnishhist_options.h
@@ -40,7 +40,7 @@
#define HIS_OPT_P \
VOPT("P:", "[-P <size|responsetime|tag:field_num:min:max>]", "Profile definition", \
- "Either specify \"size\" or \"responstime\" profile or create a new one" \
+ "Either specify \"size\" or \"responstime\" profile or create a new one." \
" Define the tag we'll look for, and the field number of the value" \
" we are interested in. min and max are the boundaries of the graph" \
" (these are power of tens)" \
diff --git a/doc/sphinx/reference/varnishhist.rst b/doc/sphinx/reference/varnishhist.rst
index f513294..901c7f4 100644
--- a/doc/sphinx/reference/varnishhist.rst
+++ b/doc/sphinx/reference/varnishhist.rst
@@ -9,8 +9,8 @@ Varnish request histogram
SYNOPSIS
========
-varnishhist [-b] [-C] [-c] [-d] [-I regex] [-i tag] [-m tag:regex ...]
-[-n varnish_name] [-r file] [-V] [-w delay] [-X regex] [-x tag]
+.. include:: ../../../bin/varnishhist/varnishhist_synopsis.rst
+varnishhist |synopsis|
DESCRIPTION
===========
@@ -24,44 +24,7 @@ and misses are marked with a hash character ("#").
The following options are available:
--b Include log entries which result from communication with
- a backend server. If neither -b nor -c is
- specified, varnishhist acts as if they both were.
-
--C Ignore case when matching regular expressions.
-
--c Include log entries which result from communication with
- a client. If neither -b nor -c is specified,
- varnishhist acts as if they both were.
-
--d Process old log entries on startup. Normally, varnishhist
- will only process entries which are written to the
- log after it starts.
-
--I regex Include log entries which match the specified
- regular expression. If neither -I nor -i is specified,
- all log entries are included.
-
--i tag Include log entries with the specified tag. If neither
- -I nor -i is specified, all log entries are included.
-
--m tag:regex only count transactions where tag matches regex. Multiple
- -m options are AND-ed together.
-
--n Specifies the name of the varnishd instance to get logs
- from. If -n is not specified, the host name is used.
-
--r file Read log entries from file instead of shared memory.
-
--V Display the version number and exit.
-
--w delay Wait at least delay seconds between each update. The
- default is 1. file instead of displaying them. The file
- will be overwritten unless the -a option was specified.
-
--X regex Exclude log entries which match the specified regular expression.
-
--x tag Exclude log entries with the specified tag.
+.. include:: ../../../bin/varnishhist/varnishhist_options.rst
SEE ALSO
========
More information about the varnish-commit
mailing list