Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit b86200c

Browse files
committed
Add man page support to the skeleton
1 parent 14aabf7 commit b86200c

4 files changed

Lines changed: 76 additions & 1 deletion

File tree

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ACLOCAL_AMFLAGS = -I m4
22

3-
SUBDIRS = src
3+
SUBDIRS = src man

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ AC_PROG_INSTALL
2222
AC_PROG_LIBTOOL
2323
AC_PROG_MAKE_SET
2424

25+
# Check for rst utilities
26+
AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py], "no")
27+
if test "x$RST2MAN" = "xno"; then
28+
AC_MSG_WARN([rst2man not found - not building man pages])
29+
fi
30+
AM_CONDITIONAL(HAVE_RST2MAN, [test "x$RST2MAN" != "xno"])
31+
2532
# Check for pkg-config
2633
PKG_PROG_PKG_CONFIG
2734

@@ -62,5 +69,6 @@ AC_CONFIG_FILES([
6269
Makefile
6370
src/Makefile
6471
src/tests/Makefile
72+
man/Makefile
6573
])
6674
AC_OUTPUT

man/Makefile.am

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
3+
dist_man_MANS = vmod_example.3
4+
MAINTAINERCLEANFILES = $(dist_man_MANS)
5+
6+
vmod_example.3: vmod_example.rst
7+
if HAVE_RST2MAN
8+
${RST2MAN} vmod_example.rst $@
9+
else
10+
@echo "========================================"
11+
@echo "You need rst2man installed to make dist"
12+
@echo "========================================"
13+
@false
14+
endif

man/vmod_example.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
============
2+
vmod_example
3+
============
4+
5+
----------------------
6+
Varnish Example Module
7+
----------------------
8+
9+
:Author: Martin Blix Grydeland
10+
:Date: 2011-05-26
11+
:Version: 1.0
12+
:Manual section: 3
13+
14+
SYNOPSIS
15+
========
16+
17+
import example;
18+
19+
DESCRIPTION
20+
===========
21+
22+
Example Varnish vmod demonstrating how to write an out-of-tree Varnish vmod.
23+
24+
Implements the traditional Hello World as a vmod.
25+
26+
FUNCTIONS
27+
=========
28+
29+
hello
30+
-----
31+
32+
Prototype
33+
hello(STRING S)
34+
Return value
35+
STRING
36+
Description
37+
Returns "Hello, " prepended to S
38+
Example
39+
set resp.http.hello = example.hello("World");
40+
41+
HISTORY
42+
=======
43+
44+
This manual page was released as part of the libvmod-example package,
45+
demonstrating how to create an out-of-tree Varnish vmod.
46+
47+
COPYRIGHT
48+
=========
49+
50+
This document is licensed under the same license as the
51+
libvmod-example project. See LICENSE for details.
52+
53+
* Copyright (c) 2011 Varnish Software

0 commit comments

Comments
 (0)