summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-08-21 17:54:04 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2010-08-21 17:54:04 +0200
commit99ca8abacf61a7195e227704984ff96a0a868bc3 (patch)
treec0d67b86728cc20f9c1db10c79a50d8d902c7b30
parent3bf78101a7e43057df563fe7a234b991e8de80d0 (diff)
Add version information to manpages
-rw-r--r--.gitignore1
-rw-r--r--Makefile10
-rw-r--r--man/Makefile16
-rw-r--r--man/feh-cam.pre (renamed from man/feh-cam.1)3
-rw-r--r--man/feh.pre (renamed from man/feh.1)4
-rw-r--r--man/gen-cam-menu.pre (renamed from man/gen-cam-menu.1)3
6 files changed, 35 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 654402f..54df9de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/src/*.o
/src/*.inc
/src/feh
+/man/*.1
diff --git a/Makefile b/Makefile
index 13d2bc0..05a3d83 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,13 @@
include config.mk
-all:
+all: build-src build-man
+
+build-src:
@${MAKE} -C src
+build-man:
+ @${MAKE} -C man
+
test: all
@PACKAGE=${PACKAGE} VERSION=${VERSION} prove test
@@ -14,7 +19,7 @@ install: install-man install-doc install-bin install-font install-img
install-man:
@echo installing manuals to ${man_dir}
@mkdir -p ${man_dir}/man1
- @cp man/* ${man_dir}/man1
+ @cp man/*.1 ${man_dir}/man1
@chmod 644 ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1 \
${man_dir}/man1/gen-cam-menu.1
@@ -54,6 +59,7 @@ uninstall:
clean:
@${MAKE} -C src clean
+ @${MAKE} -C man clean
.PHONY: all test test-x11 install uninstall clean install-man install-doc \
install-bin install-font install-img
diff --git a/man/Makefile b/man/Makefile
new file mode 100644
index 0000000..35a21b7
--- /dev/null
+++ b/man/Makefile
@@ -0,0 +1,16 @@
+include ../config.mk
+
+SOURCES = ${shell echo *.pre}
+TARGETS = ${SOURCES:.pre=.1}
+
+all: ${TARGETS}
+
+.pre.1:
+ sed 's/\$$VERSION\$$/${VERSION}/g' < ${@:.1=.pre} > $@
+
+clean:
+ rm *.1
+
+.SUFFIXES: .pre .1
+
+.PHONY: clean
diff --git a/man/feh-cam.1 b/man/feh-cam.pre
index a8b01f3..ad21341 100644
--- a/man/feh-cam.1
+++ b/man/feh-cam.pre
@@ -10,6 +10,9 @@
.Op Ar options
.Ar keys
.
+.Sh VERSION
+This manual documents feh-cam, shipped with feh version $VERSION$
+.
.Sh DESCRIPTION
.Nm
is a perl wrapper for feh which simplifies viewing webcams using keyed
diff --git a/man/feh.1 b/man/feh.pre
index 88fd49d..3ddc291 100644
--- a/man/feh.1
+++ b/man/feh.pre
@@ -14,6 +14,10 @@
.Ar files or directories ...
.
.
+.Sh VERSION
+This manual documents feh $VERSION$
+.
+.
.Sh DESCRIPTION
.Nm
is a mode-based image viewer. It is especially aimed at commandline users who
diff --git a/man/gen-cam-menu.1 b/man/gen-cam-menu.pre
index c8929eb..67460e8 100644
--- a/man/gen-cam-menu.1
+++ b/man/gen-cam-menu.pre
@@ -8,6 +8,9 @@
.Sh SYNOPSIS
.Nm
.
+.Sh VERSION
+This manual documents gen-cam-menu, shipped with feh version $VERSION$
+.
.Sh DESCRIPTION
.Nm
is a shell script which creates Enlightenment user menu entries for the